Hi Ticker,

sounds great. Please can you add some unit tests to show what it does with 
holes, points on the split line
and one or more line segments  on the split line?

Gerd
________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Ticker 
Berkin <[email protected]>
Gesendet: Samstag, 7. Januar 2017 18:36:31
An: mkgmap development
Betreff: [mkgmap-dev] New code for splitting polygon

Hi Gerd

I've written some new code for splitting polygons in an efficient
manner. The main interface takes a shape and line of latitude or
longitude and returns 2 lists of shapes on either side of the line.
There is also a function to clip to rectangle.

I've put the code in util/ShapeSplitter but it could go elsewhere if
you prefer.

So far I've only converted build/MapArea to use it, but I think it can
be used throughout eventually. For the moment I've commented out the
old code in MapArea, but this can be deleted in a while.

Regards
Ticker
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to