
Hi, the following quote from cGPSmapper describes peculiarities of command "Background=Y": If there is only one object set as the background, then the EndLevel is automatically set to 9. If there is no background object, or more than one, then the EndLevel is not changed. As I understand, background is a special object for cGPSmapper. If there is only single background in a source, then compiler can modify EndLevel value. Mkgmap doesn't change EndLevel. I prepared a patch, that simply extends EndLevel for any background object, which contains only "Data0=" layer. I hope this should work for most cases. Proper solution would be to count all background objects and conditionally modify single background after reading an entire source file. -- Best regards, Andrzej

Hi Andrzej, please describe the problem that is solved with this patch. Does it mean that the background polygon is not added to all levels without the patch? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Donnerstag, 12. März 2020 16:25 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: [mkgmap-dev] Background in polish format reader Hi, the following quote from cGPSmapper describes peculiarities of command "Background=Y": If there is only one object set as the background, then the EndLevel is automatically set to 9. If there is no background object, or more than one, then the EndLevel is not changed. As I understand, background is a special object for cGPSmapper. If there is only single background in a source, then compiler can modify EndLevel value. Mkgmap doesn't change EndLevel. I prepared a patch, that simply extends EndLevel for any background object, which contains only "Data0=" layer. I hope this should work for most cases. Proper solution would be to count all background objects and conditionally modify single background after reading an entire source file. -- Best regards, Andrzej

Hi Gerd, yes, when I compile my map, I get only object 4b at layer 0. I use simple definition of background: [POLYGON] Type=0x4b Background=Y Data0=... [END] This works for cGPSmapper, but not for mkgmap. I could add EndLevel=5 to all my sources, but it was easier to recompile mkgmap, to make it a bit more compatible with cGPSmapper. -- Best regards, Andrzej

Hi Andrzej, thanks, committed with r4466. I wonder why Background=Y is needed. In most mkgmap sources a polygon with type 0x4b is a synomym for background. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Freitag, 13. März 2020 12:35 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] Background in polish format reader Hi Gerd, yes, when I compile my map, I get only object 4b at layer 0. I use simple definition of background: [POLYGON] Type=0x4b Background=Y Data0=... [END] This works for cGPSmapper, but not for mkgmap. I could add EndLevel=5 to all my sources, but it was easier to recompile mkgmap, to make it a bit more compatible with cGPSmapper. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, thanks for updating mkgmap. I think the idea behind background is to provide an arbitrary shape for trimming tile area. CGPSmapper doesn't execute trim on mp files, so the meaning of background is lost. -- Best regards, Andrzej
participants (2)
-
Andrzej Popowski
-
Gerd Petermann