paulmach / orb

Types and utilities for working with 2d geometry in Golang
MIT License
886 stars 103 forks source link

Subdivide polygon #114

Closed AgentNemo00 closed 1 year ago

AgentNemo00 commented 1 year ago

Hello,

I'm trying to subdivide a polygon into sub polygons as described in this [post](https://gis.stackexchange.com/a/375130). Has anyone ever archieved a this ?

paulmach commented 1 year ago

Well, if you know where you want to draw the lines and the sections are boxes you can use the smartclip subpackage to cut the large polygon.

Figuring out where to cut is another matter. I'm sure the general case would be really hard, but if you could determine a starting point you could optimize it in a loop by adjusting the lines accordingly. ?