Commit r3867: refactoring, no functional change: simplify code to add background polygon (type 0x4B)

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

Commit r3867: refactoring, no functional change: simplify code to add background polygon (type 0x4B)

svn commit
Version mkgmap-r3867 was committed by gerd on Sun, 26 Mar 2017

refactoring, no functional change: simplify code to add background polygon (type 0x4B)



http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=3867
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Commit r3867: refactoring, no functional change: simplify code to add background polygon (type 0x4B)

Gerd Petermann
Hi all,

I think the meaning of the --transparent option is a bit unclear .
It tells mkgmap to set a flag in the TRE header and it tells mkgmap NOT to add a background polygon (0x4B) covering the tile.
I wonder if it should also mean that mkgmap should remove (filter) all 0x4b polygons
added by the style or read from polish (*.mp) sources (and maybe warn about this when it does so).
The current implementation doesn't do that.

The implementation for the overview map always adds a 0x4b polygon in the overview map,
no matter what the --transparent option says. The TRE header in the overview map is written with default values
(not transparent, draw priority 25).
I assume that is okay since I don't think that one can have multiple overview maps.

Gerd
________________________________________
Von: mkgmap-dev <[hidden email]> im Auftrag von svn commit <[hidden email]>
Gesendet: Sonntag, 26. März 2017 14:18:53
An: [hidden email]; [hidden email]
Betreff: [mkgmap-dev] Commit r3867: refactoring, no functional change: simplify code to add background polygon (type 0x4B)

Version mkgmap-r3867 was committed by gerd on Sun, 26 Mar 2017

refactoring, no functional change: simplify code to add background polygon (type 0x4B)



http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=3867
_______________________________________________
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: Commit r3867: refactoring, no functional change: simplify code to add background polygon (type 0x4B)

popej
Hi Gerd,

I prefer current working of --transparent option. If anyone creates
background polygons manually, then IMHO would be better to not remove them.

I have used once this possibility to test non-rectangle background.

--
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: Commit r3867: refactoring, no functional change: simplify code to add background polygon (type 0x4B)

Gerd Petermann
Hi Andrzej,

What bothers me is that such a polygon in an *.mp file will suppress the generated rectangular 0x4b shape
but with osm input it would still be added unless you use --transparent which will also set a flag in the TRE header
(PoiDisplayFlags)

I think it would be no problem to have a rule like this
natural=land [0x4b resolution 0]
Don't know if there was code to suppress this in the past, but current mkgmap allows it.

I did not try what effects you get with the different combinations of TRE header flag and 0x4b shapes.

Gerd



________________________________________
Von: mkgmap-dev <[hidden email]> im Auftrag von Andrzej Popowski <[hidden email]>
Gesendet: Sonntag, 26. März 2017 15:15:20
An: [hidden email]
Betreff: Re: [mkgmap-dev] Commit r3867: refactoring, no functional change: simplify code to add background polygon (type 0x4B)

Hi Gerd,

I prefer current working of --transparent option. If anyone creates
background polygons manually, then IMHO would be better to not remove them.

I have used once this possibility to test non-rectangle background.

--
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: Commit r3867: refactoring, no functional change: simplify code to add background polygon (type 0x4B)

popej
Hi Gerd,

cgpsmapper can create 3 types of map:
- transparent - TRE flag set and no background
- semi-transparent - TRE flag not set and no background
- normal - TRE flag not set and background exist

For normal maps, cgpsmapper creates background rectangle if no
background object exist in source code. Background object is defined by
explicit declaration "Background=Y". I'm not sure if this declaration
could be added to any other object type than 0x4B. Probably marine maps
use other type for background.

I think current algorithm in mkgmap is good enough. What you can add is
an option to stop creating default background, like for example
--background=no. But I don't think it would have much use.

I don't know if there is any peculiarity to background object in img. Is
it marked as background somewhere in img data? If yes, then you can
consider adding an ability in style to set this marking, for example
like "set mkgmap:background=yes".

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