idris-ensure-clockwise

0.0.0 • Public • Published

idris-ensure-clockwise

For when your geojson polygons cover the whole projection with a hole in the shape of your polygon. Happened to me using OSM data with D3.

JS implementation of Shoelace formula taken from kodkods answer to this question

No dependencies

Install

$ npm install idris-ensure-clockwise

Usage

Takes a GeoJSON collection, fixes the Polygons and MultiPolygons that are not clockwise and returns a new collection

var ensureClockwise = require('idris-ensure-clockwise')

ensureClockwise(GeoJSON_collection, function(fixed_GeoJSON_collection) {

})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.0
    9
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.0
    9

Package Sidebar

Install

npm i idris-ensure-clockwise

Weekly Downloads

1

Version

0.0.0

License

GPL

Last publish

Collaborators

  • idris-maps