bjornharrtell / jts2geojson

JTS from/to GeoJSON converter for Java
MIT License
138 stars 56 forks source link

added handling of missing geometry attribute #50

Closed ttomasz closed 1 year ago

ttomasz commented 1 year ago

GeoJSON spec allows "geometry": null but I encountered file where the author just skipped geometry attribute altogether.

Jackson parses that to node = null. Current check expects node object with method isNull so it throws NullPointerException.

I think that should be handled gracefully by just assuming missing geometry == geometry: null even though that's not covered by the spec.

bjornharrtell commented 1 year ago

Seems sensible, thanks!