Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider use of PROJJSON for unenumerated CRSs? #333

Open
hobu opened this issue Feb 18, 2020 · 3 comments
Open

Consider use of PROJJSON for unenumerated CRSs? #333

hobu opened this issue Feb 18, 2020 · 3 comments
Labels
Future work support in an additional part of OGC API Features

Comments

@hobu
Copy link

hobu commented Feb 18, 2020

PROJJSON is a faithful, if verbose, encoding of OGC WKTv2 in JSON by @rouault. It has a few things going for it that make it an interesting candidate for CRS definition description in OGC API:

I wrote a simple AWS Lambda endpoint that can be manipulated to return PROJJSON of enumerated CRSs. For example, this returns WGS84 geocentric + EGM2008 (everything in the definition node is PROJJSON, the other nodes are my bookkeeping):

https://henzuru.io/v1/crs/EPSG/4978+3855 <-- PROJJSON
https://henzuru.io/v1/crs/EPSG/4978+3855/WKT <-- WKTv2

Here's a couple of other examples:

https://henzuru.io/v1/crs/EPSG/4326 <-- The mother CRS
https://henzuru.io/v1/crs/ESRI/54028 <-- Cassini using ESRI code

I haven't been tracking the OGC API CRS efforts close enough to know about their expected intent, but as a downstream application consumer of the data, as currently specified, they still require me to dereference the definition from somewhere other than directly in my application. This can still work ok for well known enumerated CRSs, but for anything sufficiently interesting, we're kind of stuck slinging escaped WKT (of various flavors) around.

@cholmes said I should file a ticket asking about this, so the topic being brought up is his fault 😛

@cportele
Copy link
Member

Many thanks, @hobu (and @cholmes).

The current scope for Part 2 is "Coordinate Reference Systems by Reference" (the bolding is mine). That is, we have kept full descriptions of CRSs out-of-scope (as most developers wouldn't know what to do with them anyhow) and just support CRS identifiers (URIs) - with the recommendation to use the OGC URIs.

There is no expectation in Part 2 that clients will dereference the URIs and parse a CRS description. As a result there is currently no discussion in the draft about dereferencing or formats. APIs can only express support for an enumerated list of CRSs. This is a conscious decision, but as the title of Part 2 implies, if there is enough demand for supporting full CRS descriptions, another extension could be developed. In that case, WKT2 as an OGC standard would probably be a supported format, but PROJJSON is indeed interesting in an API context, too.

@cholmes
Copy link
Member

cholmes commented Feb 27, 2020

Cool, makes sense to limit scope initially. It does seem useful to have online JSON representations of the actual CRS information, but agree that it'd be good to see the desire in the market. And it doesn't feel like it'd be hard to integrate Howard's lambda endpoint with Features API, so hopefully we get some implementations and can standardize from there.

In STAC we are including PROJJSON as an option in the projection extension. This is for content, so items could choose to include a projjson if they want.

@jerstlouis
Copy link
Member

jerstlouis commented Apr 6, 2021

We are also suggesting the use of PROJJSON in Coverages as well, and I hope the CRS SWG could standardize the PROJJSON encoding as an OGC standard for use in any JSON context where a full CRS definition is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Future work support in an additional part of OGC API Features
Projects
None yet
Development

No branches or pull requests

4 participants