antv-l7/node_modules/@mapbox/geojson-rewind
thinkinggis f7e5376b7d fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
..
node_modules/.bin fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
test fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
.travis.yml fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
HELP.md fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
LICENSE.txt fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
Makefile fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
README.md fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
geojson-rewind fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
geojson-rewind.js fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
index.js fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
package.json fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
yarn.lock fix(fix css): fix css png 2019-11-22 18:04:14 +08:00

README.md

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 geojson-rewind

as console utility

# install
npm install -g geojson-rewind
# use
geojson-rewind foo.geojson

as browser library

copy 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.