That single Polygon coordinate array lists multiple linear rings; according to the Polygon specification, that 2nd array is (and any after are) actually a hole meant as a cutout from the first listed linear ring:
For Polygons with more than one of these rings, the first MUST be the exterior ring, and any others MUST be interior rings. The exterior ring bounds the surface, and the interior rings (if present) bound holes within the surface.
Instead, I believe it should be specified this way with multiple Polygon arrays within the coordinates array, each with a single linear ring:
I believe that the ShakeMap GeoJSON rupture geometry files, documented here, don't strictly conform to the GeoJSON specification (RFC 7946).
ShakeMap uses the
MultiPolygon
geometry type, and formats the geometry array this way:Even though this is a
MultiPolygon
, thecoordinates
array only contains a singlePolygon
coordinate array:That single
Polygon
coordinate array lists multiple linear rings; according to thePolygon
specification, that 2nd array is (and any after are) actually a hole meant as a cutout from the first listed linear ring:Instead, I believe it should be specified this way with multiple
Polygon
arrays within thecoordinates
array, each with a single linear ring:For a real world example with this issue, see the Ridgecrest M7.1 ShakeMap: https://earthquake.usgs.gov/product/shakemap/ci38457511/atlas/1594160054783/download/rupture.json
I have attached it (after reformatting for readability) here: rupture_original_reformatted.json
And here is a modified version that I believe conforms to the GeoJSON spec: rupture_fixed.json
I think that correcting this issue will help users to more easily use these files in existing codes without having to write special cases. Thanks!