JSPM

polyline-clean

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q41233F
  • License MIT

Clean polygon or polyline coordinates remove duplicate, collinear, empty points etc.

Package Exports

  • polyline-clean

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (polyline-clean) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

polyline-clean experimental Build Status

Clean polyline or polygon data: remove duplicate, collinear, null points etc.

npm install polyline-clean

const c = require('polyline-clean')

c([[0,0], [null,null], [1,1], [0,2], [1,1], [.5,.5], [3,3]]) // [[0,0], [3,3]]
c([[0,0], [.5,.500001], [1,1]], {threshold: 1e-2}) // [[0,0], [1,1]]
c([[0,0], [.5,.5], [1,1]], {ids: true}) // [0, 2]

License

(c) 2018 Dmitry Yv. MIT License