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

Accept/ignore additional top-level GeoJSON keys #7

Open
2 tasks
nbolten opened this issue Mar 30, 2023 · 0 comments
Open
2 tasks

Accept/ignore additional top-level GeoJSON keys #7

nbolten opened this issue Mar 30, 2023 · 0 comments

Comments

@nbolten
Copy link
Member

nbolten commented Mar 30, 2023

Our typing of the top-level GeoJSON object is currently very strict, requiring that the type and features keys, and only those keys, are defined. Real-world GeoJSON files often have additional top-level keys, such as crs (to specify an alternative coordinate system), bounds or bbox for the extent of the dataset, name to create a named layer, and so on.

To my knowledge, we don't really care whether there is additional information at that top level. At most, we may want to set restrictions on certain optional keys. For example, we do want the crs to have a value of WGS84, if it's defined.

This is a list of (currently) suggested changes (and whether they have been implemented):

  • If crs is defined at the top level, require that it refer to WGS84. It may be difficult to set this requirement through jsonschema, but we could at least support an enum that includes { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }.
  • Ignore and allow all extra keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant