Narcissistic Preening Monarch
    Wondering what’s next for npm?Check out our public roadmap! »

    @mapbox/geojson-rewind

    0.5.0 • Public • Published

    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.

    Install

    npm i @mapbox/[email protected]

    Version

    0.5.0

    License

    ISC

    Unpacked Size

    4.5 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar