Skip to content

pcofilada/poly-slice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poly-slice

PolySlice is a lightweight npm package designed to simplify the process of cutting and splitting GeoJSON polygon using a provided linestring. It offers a straightforward way to perform geometric operations on your spatial data.

Quality Gate Status ISC License npm npm bundle size

Installation

NPM

npm install poly-slice

Yarn

yarn add poly-slice

Usage

import polySlice from "poly-slice";

// Your GeoJSON polygon and linestring features
const polygon = /* your GeoJSON polygon feature */;
const linestring = /* your GeoJSON linestring feature */;

// Use PolySlice to cut the polygon
const slicedPolygons = polySlice(polygon, linestring);

Contributing

Feel free to contribute by opening issues or submitting pull requests. Contributions are always welcome!

License

This project is licensed under the ISC License - see the LICENSE file for details.