Polygon 4A in mp sources

Hi, I'm trying to edit and compile preview map in mp format. Unfortunately mkgmap forces a restriction: SEVERE (MapFailedException): img\Topo.mp: (thrown in PolishMapDataSource.checkType()) invalid type 0x4a for POLYGON I'm not sure, why this restriction exist. Is there any problem to accept polygon 4A in mp source? -- Best regards, Andrzej

Hi Andrzej, I think this was introduced with r4437: http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4437 I don't remember why type 0x4a was refused for polygon rules. Probably someone used it without knowing the special meaning. If you can confirm that 4437 or older produced a correct map with your input I can add code to exclude 0x4a from this check in polish reader. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Samstag, 14. März 2020 15:00 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: [mkgmap-dev] Polygon 4A in mp sources Hi, I'm trying to edit and compile preview map in mp format. Unfortunately mkgmap forces a restriction: SEVERE (MapFailedException): img\Topo.mp: (thrown in PolishMapDataSource.checkType()) invalid type 0x4a for POLYGON I'm not sure, why this restriction exist. Is there any problem to accept polygon 4A in mp source? -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, preview compiled with r4436 works correctly. You probably can relax the check for all readers. Polygon 0x4A needs some extra care, when mkgmap creates its own preview map, but I don't think it is dangerous in a detailed tile. -- Best regards, Andrzej

Hi Andrzej, maybe you are right. With r4467 I've only relaxed the test for the polish reader. The style check was introduced in r2932 in 2014. I found this discussion about 0x4a: http://gis.19327.n8.nabble.com/polygon-type-0x4a-tt5761430.html I think I mixed the meaning of 0x4a and 0x4b then but the source still contains comments where 0x4a is called a "background polygon". Unfortunately I didn't find a good reason why the change in r2932 also added the check for 0x4a polygons. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Samstag, 14. März 2020 20:24 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] Polygon 4A in mp sources Hi Gerd, preview compiled with r4436 works correctly. You probably can relax the check for all readers. Polygon 0x4A needs some extra care, when mkgmap creates its own preview map, but I don't think it is dangerous in a detailed tile. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, your solution for polish reader is OK, thanks. As for other readers, mkgmap should have some handling/protection for the use of 4A and 4B in style. I haven't noticed any (I can be wrong), so maybe is better to ban both these types for now. -- Best regrads, Andrzej
participants (2)
-
Andrzej Popowski
-
Gerd Petermann