Projjson and CRS defaults #98
Replies: 2 comments 5 replies
-
Isn't it just a matter of testing crs["type"] == "GeographicCRS" ? If clients don't care about datums and the like, that's enough to check if it is a lat/lon type of CRS.
No, we can't do that. One legitimate use case of PROJJSON is to specify CRS not present in EPSG or any other authority. That's actually the main use case for PROJJSON (or WKT). Otherwise, if you always use "known" CRS, they you just use things like "srsId" = "EPSG:4326" But of course I agree that as a recommendation we ask writers to write the "id" member when it is known.
I don't like this... |
Beta Was this translation helpful? Give feedback.
-
It seems like a core issue here is whether or not we are trying to distinguish between a CRS that holds longitude / latitude data (based on in whatever sphereoid, meridian, etc) and one that is equivalent enough to OGC:CRS84 / EPSG:4326. The former runs the risk of misinterpretation especially when there is no clear documentation between the data producer and consumer (via a more complete PROJJSON record, for instance), which I'm hoping we can agree here would be a bad thing and we shouldn't make that eaiser to do. Is there a case where a CRS can be functionally equivalent to OGC:CRS84 / EPSG:4326 but not have an ID set? It seems that any of the custom ones that lack an ID would also no longer be functionally equivalent. Thus it might be sufficient simply to check for these IDs specifically, and not probe other properties to try and determine functional equivalence. |
Beta Was this translation helpful? Give feedback.
-
I've been thinking about CRS's and defaults, as we talked about in our co-working session
Thanks @brendan-ward for putting together the #97 to get a sense of what the 'recommendations' would look like for a naive implementation if we required them.
I do think that an extra field that non-CRS clients can easily rely upon to know data is long/lat makes for a simpler story (be it a 'profile' as suggested in #89 or a simpler true/false field).
The biggest downside is that information between the two could be out of sync, and we'd need all kinds of corner case guidance as to which to 'trust', what to do if the crs is null, etc.
But I was wondering if we could just enhance the projjson spec in some way to include the 'simple' information, or make some requirement for the use of projjson in geoparquet. Like since projjson is a spec that we are proposing as part of geoparquet can we make it work better for us? Then there would just be one place to check. I'm thinking ideas like:
And there may be better ideas if we open the aperture to include tweaking with projjson spec.
I do think if we could reliably tell non-crs aware clients that 'you can reliably look at projjson ID and if it's EPSG:4326 or OGC:CRS84 then you can treat it as long/lat' then that seems straightforward enough for me. I think it's ok if that doesn't capture custom ones that are equivalent to a proj reader, especially if we have some clear recommendations to writers to always include the id if at all possible. Like ideally a 'geoparquet validator' would at least raise a 'warning' if it finds a crs that is equivalent but does not include an ID. I do think the extension/profile idea could be interesting, though more as just a 'validation profile' that would tell you that if you included the ID then you'd meet that certain profile (but there wouldn't be an explicit identifier that clients would read to be able to make assumptions, which is how COG works, there's not a field that says 'I am a COG', you're just a COG if you meet the requirements).
Beta Was this translation helpful? Give feedback.
All reactions