Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

use text string for WKT-CRS #89

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

marqh
Copy link

@marqh marqh commented Dec 27, 2018

I think it is beyond the scope of CovJSON to produce a JSON encoding of WKT-CRS.

Prefer the use of WKT strings as-is in CovJSON documents (as string values) represents a sensible position to take at this time.

My sense is that it is a treacherous path to include such a re-encoding of another standard within this specification.

I would suggest that initially this section be removed, following a consultation on who may be using it.

We can highlight the desire to encode WKT-CRS within JSON payloads to the Maintainers of CRS-WKT and request input on how to do this effectively.
I suspect that, at a minimum, it would require the publishing of the controlled vocabularies encoded within the WKT-CRS specification.

Does this raise concerns with contributors?

Would further information help this section?

@marqh marqh mentioned this pull request Dec 27, 2018
5 tasks
@letmaik letmaik added the crs For issues etc relating to CRS handling label Dec 27, 2018
@letmaik
Copy link
Member

letmaik commented Dec 27, 2018

CovJSON is all about ease of use and lots of examples. Can you re-add the vertical CRS example in WKT form to get a better idea of it?

@marqh
Copy link
Author

marqh commented Dec 27, 2018

CovJSON is all about ease of use and lots of examples. Can you re-add the vertical CRS example in WKT form to get a better idea of it?

That seems fine. I have added a WKT string.

I have included newlines but I have not justified the text. WKT is whitespace neutral so it can be formatted to aid readability. I can change it again if there's a view on what would read better.

@letmaik
Copy link
Member

letmaik commented Dec 27, 2018

Your JSON is not valid, please use something like https://jsonlint.com/ to check it.

@marqh
Copy link
Author

marqh commented Dec 28, 2018

i have added escape characters to the double quotes and the line returns for the WKT string, and a comment highlighting this

@letmaik
Copy link
Member

letmaik commented Dec 28, 2018

It also includes escaped line returns and extra whitespace; whilst these are not required for WKT-CRS they do aid readability.

Line returns should be \n only, not \\n, as otherwise you have a literal backslash followed by n.

How do the line returns aid readability here? If anything it makes it more complicated when looking at the raw JSON. Pretty-printing WKT strings is another matter and could be handled by some library if one really wants to print it out somehow (what's the use case?), but I don't think there's any way to make them pretty and accessible in JSON itself, which was the purpose of the existing object encoding.

@marqh
Copy link
Author

marqh commented Dec 28, 2018

Line returns should be \n only, not \\n, as otherwise you have a literal backslash followed by n.

i see, but no matter. If you also don't think they help, I'll remove them, I was pretty unsure about putting them in.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crs For issues etc relating to CRS handling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants