mapbox / geojson.io

A quick, simple tool for creating, viewing, and sharing spatial data
http://geojson.io/
ISC License
1.87k stars 560 forks source link

Rendering Issue with Empty MultiLineString in GeoJSON #873

Open DaanJG opened 6 months ago

DaanJG commented 6 months ago

When loading a GeoJSON with an empty MultiLineString geometry into geojson.io, subsequent valid geometries were not rendered. However, these geometries rendered correctly when the empty MultiLineString was removed. This behaviour seems inconsistent with the GeoJSON specification.

Relevant Standard Excerpt (RFC 7946, https://datatracker.ietf.org/doc/html/rfc7946):

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

What ever way they are interpreted, it's seems logical to just plot nothing and move on.

(An empty coordinates array arises naturally from code that doesn't yield certain results.)