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

feature without 'properties' key doesn't error #182

Merged
merged 1 commit into from
Apr 8, 2022

Conversation

michaelkirk
Copy link
Member

  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

I think "properties" is actually a required field for Feature and FeatureCollections, but sometimes in the wild it's missing.

In the interest of being strict about what we emit while being permissive about what we accept, I think it'd be helpful for users to go forward when there is no properties key, and treat it just like null or empty properties.

FWIW, ogr2ogr handles this without exploding.

@urschrei
Copy link
Member

urschrei commented Apr 7, 2022

Oh, good catch.

Copy link
Member

@frewsxcv frewsxcv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://datatracker.ietf.org/doc/html/rfc7946#section-3.2

Hmm it does seem to be required. I'm okay with this merging, though it could be nice to list out where we stray from the spec. Either in the top level crate docs, or on Feature. What do you think?

@michaelkirk
Copy link
Member Author

Either in the top level crate docs, or on Feature

Good call. I've added a doc to the Feature.properties. WDYT @frewsxcv

I want to add something to the top level docs too, but I'd prefer to follow up (shortly!) with a light overhaul of the top level docs. Is that OK?

Even though properties is required for features, sometimes in the wild
it's missing. In the interest of being strict about what we emit while
being permissive about what we accept, I think it'd be helpful for users
to go forward when there is no properties key, and treat it just like
null or empty properties.
@michaelkirk
Copy link
Member Author

squashed.

bors r=urschrei

I've got another docs PR coming momentarily if you'd like me to make any changes to the docs added here.

@bors
Copy link
Contributor

bors bot commented Apr 8, 2022

Build succeeded:

@bors bors bot merged commit d8df17f into master Apr 8, 2022
@frewsxcv frewsxcv deleted the mkirk/handle-missing-props branch April 9, 2022 00:15
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

Successfully merging this pull request may close these issues.

4 participants