Background in polish format reader

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Background in polish format reader

popej
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

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

backgroundMP.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Background in polish format reader

Gerd Petermann
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 <[hidden email]> im Auftrag von Andrzej Popowski <[hidden email]>
Gesendet: Donnerstag, 12. März 2020 16:25
An: [hidden email]
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
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Background in polish format reader

popej
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
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Background in polish format reader

Gerd Petermann
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 <[hidden email]> im Auftrag von Andrzej Popowski <[hidden email]>
Gesendet: Freitag, 13. März 2020 12:35
An: [hidden email]
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
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Background in polish format reader

popej
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
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev