[mkgmap-dev] patch to write polygons in decreasing order
From Ticker Berkin rwb-mkgmap at jagit.co.uk on Mon Nov 7 22:24:22 GMT 2016
Hi Gerd I've been looking at ShapeSplitter and clipping to a rectangle algorithms generally. I don't feel I know enough about how to use the java.awt.geom package to implement this effectively, and so I'd rather keep to using Java2DConverter and .intersect(), even though it is most likely much less efficient. Ticker On Sat, 2016-11-05 at 23:33 -0700, Gerd Petermann wrote: > 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 > > 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. > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
- Previous message: [mkgmap-dev] patch to write polygons in decreasing order
- Next message: [mkgmap-dev] patch to write polygons in decreasing order
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list