ngx-open-map-wrapper/node_modules/@mapbox/geojson-rewind
2025-09-29 14:55:14 -04:00
..
geojson-rewind add addzone and update zone in map-adapter interface 2025-09-29 14:55:14 -04:00
index.js add addzone and update zone in map-adapter interface 2025-09-29 14:55:14 -04:00
LICENSE.txt add addzone and update zone in map-adapter interface 2025-09-29 14:55:14 -04:00
package.json add addzone and update zone in map-adapter interface 2025-09-29 14:55:14 -04:00
README.md add addzone and update zone in map-adapter interface 2025-09-29 14:55:14 -04:00

Build Status

geojson-rewind

The GeoJSON specification is picky about winding order.

This helps you generate compliant Polygon and MultiPolygon geometries. Furthermore it lets you use Canvas and other drawing libraries's default behavior to color the interior rings of Polygon and MultiPolygon features.

Usage

As NPM module:

npm install --save @mapbox/geojson-rewind

As a console utility:

# install
npm install -g @mapbox/geojson-rewind
# use
geojson-rewind foo.geojson

As a browser library: geojson-rewind.js

API

rewind(geojson, clockwise)

Given a GeoJSON FeatureCollection, Feature, or Geometry, return a version with inner and outer rings of different winding orders.

If clockwise is true, the outer ring is clockwise, otherwise it is counterclockwise.