Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.
/ polysplit Public archive

An implementation of polygon splitting algorithm (unfinished)

License

Notifications You must be signed in to change notification settings

grimsa/polysplit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

polysplit

Synopsis

The purpose of this project is to split a given JTS polygon into any number of equal areas, while ensuring minimum length of line based cuts. The solution is based on this algorithm by Sumit Khetarpal. It works for both convex and concave polygons, as long as they don't have any intersecting edges and are defined by a single exterior ring.

Code Example

    Polygon polygon = (Polygon) new WKTReader().read("POLYGON ((0 0, 100 0, 90 50, 10 50, 0 0))");
    List<Polygon> parts = new GreedyPolygonSplitter().split(polygon, 2);

Known issues

Caution: carefuly test the code before considering it production-ready!

A list of known issues can be found under the issues tab.

Build

The project is built using Maven.

Currently requires JDK 8.

Tests

Unit tests are present for most methods.

Test cases covering real-world or randomly generated scenarios could be added.

Contributors

Developed by: Gediminas Rimša

Sponsored by: Incentergy GmbH

Contributions are welcome!

Licence

Licensed under the MIT license.

About

An implementation of polygon splitting algorithm (unfinished)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages