Skip to content

Invalid GeoJSON #10

Closed
Closed
@Plantain

Description

@Plantain

My GeoJSON wasn't rendering properly in combination with geojson-vt, and after filing a bug with them, they identified that the GeoJSON from geojsoncontour was not valid.

mapbox/tippecanoe#580

The fundamental problem is that many of the outer polygon rings are marked in the GeoJSON as being interior rings.

o 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.
Ignoring the GeoJSON spec and detecting inner/outer rings by winding rather than by ring order within the geometry gives the intended result:

Can this be fixed within geojsoncontour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions