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

geojson should parse empty point. #231

Open
michaelkirk opened this issue Aug 13, 2023 · 0 comments
Open

geojson should parse empty point. #231

michaelkirk opened this issue Aug 13, 2023 · 0 comments

Comments

@michaelkirk
Copy link
Member

michaelkirk commented Aug 13, 2023

(Edit: whoops I initially created the issue before filling out the description, sorry!).

See: georust/geozero#161

Though the spec says:

A position is an array of numbers. There MUST be two or more elements.

Later it also says:

GeoJSON processors MAY interpret Geometry objects with empty "coordinates" arrays as null objects.

I interpret that to mean that the first quote is actually a little imprecise. It should be "There MUST be two or more elements, or it can be empty in the case of a point".

Note this might be a little tricky because geo_types doesn't represent POINT EMPTY, except as Option, which doesn't always mesh well with our existing APIs.

So if we add support for this, we'll want to make sure that we address any inconsistencies - we likely need a new error class for the case of converting an empty geojson point to a geo_types::Point.

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