-
-
Notifications
You must be signed in to change notification settings - Fork 165
Closed
Description
GeoJSON.Net currently does not accept features that have no geometry member (when deserializing):
Newtonsoft.Json.JsonSerializationException: Required property 'geometry' not found in JSON.
The GeoJSON RFC says (see https://datatracker.ietf.org/doc/html/rfc7946#section-3.2):
o A Feature object has a member with the name "geometry". 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.
So, an 'unlocated' feature with null geometry is indeed allowed.
While an absent/undefined geometry member is technically not mentioned here, I don't see much difference to a null geometry: In the end you have an unlocated feature without any geometry information.
So one could argue that this case is allowed by the GeoJSON RFC. And even if it was not allowed, the library could accept it as an extension (and generate an unlocated feature for it).
Metadata
Metadata
Assignees
Labels
No labels