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.
(Edit: whoops I initially created the issue before filling out the description, sorry!).
See: https://github.com/georust/geozero/pull/161
Though the spec says:
Later it also says:
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.