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

Always include 'geometry' when 'place' is not null? #68

Closed
cportele opened this issue Sep 14, 2022 · 3 comments · Fixed by #87
Closed

Always include 'geometry' when 'place' is not null? #68

cportele opened this issue Sep 14, 2022 · 3 comments · Fixed by #87
Assignees

Comments

@cportele
Copy link
Member

GeoJSON states:

The value of the geometry member SHALL be either a Geometry object as defined above or, in the case that the Feature is unlocated, a JSON null value.

Currently you can have a place member that is non-null, but the geometry member can be null. However, the feature is obviously "located". Shouldn't we always require a non-null geometry member, if the place member is non-null (i.e. at least some representative point) to make clear that the feature has a location?

Raised during the 2022-09 Code Sprint.

@m-mohr
Copy link

m-mohr commented Sep 14, 2022

The part of the GeoJSON spec that (I think) requires this:

The value of the geometry member SHALL be either a Geometry object as defined above or, in the case that the Feature is unlocated, a JSON null value.

Highlighted text by me...

@IvanSanchez
Copy link

An interesting case is non-geographical geometries. I'm specifically thinking on 2D cartesian geometries, i.e. those in the OGC:engineering-2d CRS.

For those, it's just not possible to provide a fallback geometry that complies with the GeoJSON spec, since it's not possible to translate their coordinates to WGS84 (et al), and their raw coordinates fall outside the [-180,180],[-90,90] range (and cannot be used directly in GeoJSON).

Maybe they're not unlocated, but I'll say that they're unlocatable in WGS84 (in my understanding of the specs).

Another edge case is lunar/martian/etc CRSs (IAU:*). I'd rather leave those out as well rather than mapping to earth's WGS84.

Me personally, I'm fine with having null geometrys in JSON-FG. It won't really break backwards compatibility AFICS.

@cportele
Copy link
Member Author

Meeting 2022-10-31: If there is a JSON-FG feature with a "place" member, but "geometry" is null, this does not break GeoJSON and it basically is an unlocated feature for GeoJSON clients. And it seems unjustified to add the geometry object to a "geometry" member, if the generating software knows that the targeted client won't be using this information. So we will stick with the current approach. @cportele will write a PR to add a brief discussion to the document, this will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants