Closed fxi closed 8 years ago
@fxi "geometry": null
means the feature is unlocated and is valid GeoJSON: https://tools.ietf.org/html/rfc7946#section-3.2. It could be useful to print a message that notes a feature is unlocated, but this is not exactly a data error.
@tmcw @perrygeo can geojsonhint print a non-error message?
Thanks for your quick reply !
You are right and I should have checked this before posting something.
Moreover, my example works well in mapbox gl.
http://jsbin.com/dehalawuhe/edit?html,output
Thanks again !
@fxi can you replicate this error in both mapbox-gl-js and turf? Can you be more specific about both? mapbox-gl-js's GeoJSON processing infrastructure already has a test confirming null geometry support, so it should be able to handle null geometries correctly.
@tmcw Thanks, but I was on the wrong track with the null values, I'm sorry. Both mapbox-gl-js and turf seems to handle this well. I've removed the null geometry but I still get an error when adding a specific file as source in mapbox-gl-js. For your information, I'm trying to do a small experiment with mapbox-gl-js: an app with multiple large files, drag and drop functionality: http://bl.ocks.org/fxi/b7f1af5981432296bfafec70a95fd9b6. And naturally, there is surprises everywhere, this is why I put aside my crystal ball and looked for a smart tool like geojsonhint to do the validation job. But it's maybe not a validation thing, after all.
Hi,
"geometry: null" should be listed as an error. Turf ( or Mapbox gl) are throwing an error with this.
Thanks !
Maybe something like this :
This will fail: