Re: [mkgmap-dev] Wrong Douglas-Peucker implementation?

2021-06-08 Thread Andrzej Popowski
Hi Gerd, Josm's algorithm removes some spikes, which probably aren't common for real data and layer 0 of img. So differences aren't big. But maybe for lower resolution it could be better, especially for polygons. Wouldn't it be faster? -- Best regards, Andrzej ___

[mkgmap-dev] Wrong Douglas-Peucker implementation?

2021-06-08 Thread Gerd Petermann
Hi all, I've noticed that the line simplification in JOSM works different to the one in mkgmap. Both implement a Douglas-Peucker algo, so I wondered why. It turned out that JOSM calculates the distance of point `px` to the line through(!) end-points `p1` and `p2`, while mkgmap calculates the dis

[mkgmap-dev] Commit r4763: - fix bug in Coord.distToLineSegment(Coord a, Coord b), it returned Double.NaN when a and b are the same

2021-06-08 Thread svn commit
Version mkgmap-r4763 was committed by gerd on Tue, 08 Jun 2021 - fix bug in Coord.distToLineSegment(Coord a, Coord b), it returned Double.NaN when a and b are the same Now it returns the distance to a, similar to shortestDistToLineSegment() - minor code improvements in shortestDistToLineSegment()

Re: [mkgmap-dev] Proof of concept for better sea in overview map

2021-06-08 Thread Felix Hartmann
okay thanks for the clarifications. On Mon, 7 Jun 2021 at 22:06, Gerd Petermann wrote: > Hi Felix, > > the map contained was without routing or index, so for a normal map the > difference should be even smaller. > There is no need to change sea.zip. You just have to use > --improve-overview for

Re: [mkgmap-dev] low-res-opt branch: error message from ShapeSplitter for self-intersecting multipolygon

2021-06-08 Thread Gerd Petermann
Hi Ticker, my understanding is that Garmin software has no problems with this kind of self-intersection. In this particular case the problem could be solved in method MultipolygonRelation.joinWays(), as 4 ways are connected at the same point, but self-intersecting shapes are also possible as si