logo separator

[mkgmap-dev] patch to write polygons in decreasing order

From Gerd Petermann gpetermann_muenchen at hotmail.com on Sun Nov 6 06:33:18 GMT 2016

Hi Ticker,

Gerd Petermann wrote
> Alternative would be to implement a clipper which doesn't need
> area.intersect(). I've once coded the "Sutherland-Hodgman algorithm" but
> didn't use it yet as it failed with special cases like self-intersecting
> ways or concave shapes producing spikes, but I still think this would be a
> great improvement. See attached (out-aged) patch and the wiki
> https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm
> for further details.

I just noticed that the algo is already used in
ShapeSplitter.clipSinglePathWithSutherlandHodgman(),
the comment says
"Clip a single path with a given rectangle using the Sutherland-Hodgman
algorithm. This is much faster compared to the area.intersect method, but
may create dangling edges." 
I think these danling edges are now removed in the
RemoveObsoletePointsFilter, so maybe it is worth 
trying. 

Gerd




--
View this message in context: http://gis.19327.n8.nabble.com/patch-to-write-polygons-in-decreasing-order-tp5884038p5885439.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.


More information about the mkgmap-dev mailing list