🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

idris-ensure-clockwise

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idris-ensure-clockwise

Ensure GeoJSON polygon points are clockwise

latest
Source
npmnpm
Version
0.0.0
Version published
Maintainers
1
Created
Source

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) {

})

Keywords

GeoJSON

FAQs

Package last updated on 09 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts