geojson-rewind
enforce winding order for geojson
Last updated 7 years ago by ingalls .
ISC · Repository · Bugs · Original npm
$ cnpm install geojson-rewind 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.3.1                                ...           latest (7 years ago)

2 Versions

  • 0.1.0                                ...           12 years ago
  • 0.3.1                                ...           7 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org