logo separator

[mkgmap-dev] Problems with sea in overview map

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Tue May 25 09:11:12 BST 2021

Hi Gerd

I think we need to step back and consider the various stages towards a
good overview map which I see as:

0/ MultiPolygons spliting (just added this after I wrote the rest)
1/ subDiv shapeMerge
2/ filter chain into the ovm_ img
3/ loading all the ovm_ img into the combiner
4/ any special global merging (per overview level?)
5/ standard-ish map generation into the overview map
   ie subdivs as necessary, shape allocation into them with possible
   splitting, subdiv shapeMerge, filtering & output

Just considering subDiv shapeMerge, because, while this is producing
self-intersection and/or other errors, looking to solve problems in the
following stages is futile.

For stress-testing, it should be allowed to merge without a point limit
at res24; ShapeSpitter will deal it or report errors. Verification
should be done by looking at the ovm_ img rather than the final
overview map.

It must be wrong that its behaviour depends on the processing order.

You say it just uses identity of coord points to make all decisions; ie
it doesn't try and test if a point in one shape is on a line in another
shape. Assuming this:

To merge 2 shapes, they must have a LineSegment in common (ie each has
2 identical adjacent points in the correct direction (determinable from
the sign of the area). From finding a common LineSegment, adjacent
common LineSegments are included. Then the 2 shapes are joined without
these LineSegments (after any necessary direction correction). Any
other common LineSegments between these polygons must be ignored,
otherwise holes will get closed up.

The process is repeated until all shapes in the candidate pool have
been considered.

Sharing a single point is not good enough to consider a merge - I see
figure-of-8 problems emerging from trying this.

Ticker




More information about the mkgmap-dev mailing list