logo separator

[mkgmap-dev] Restaurant+hotel not appearing in nuvi

From Felix Hartmann extremecarver at googlemail.com on Fri Apr 3 15:05:15 BST 2009

Some month ago I proposed the feature to "double" elements already.
Right now I have to use 6 style-files for each map tile to get all the 
elements I want.

We would need a seperate file in the style-file where you can write in 
all features that should be checked for independantly whether or not an 
object has already be included (for the example this file is called 
"doublecheck").
i.e. imagine a street object with the following attributes: 
highway=track; bridge=yes; tracktype=grade1
In the style file "lines" we search for:
highway=track [0x30 resolution 18]

In the "doublecheck" file we search for:
bridge=yes [0x31 resolution 20]
tracktype=grade1 [0x33 resolution 20]

In the typ we now define (for simplicity 9=transparent,  0 =yellow, 
1=red, 2=black)
0x30:
11111111111111111111111111111111

0x31:
22222222222222222222222222222222
99999999999999999999999999999999
22222222222222222222222222222222

0x32:
00009999000099990000999900009999
00009999000099990000999900009999
99999999999999999999999999999999
99999999999999999999999999999999
99999999999999999999999999999999
99999999999999999999999999999999
99999999999999999999999999999999

The highway=track; bridge=yes; tracktype=grade1  Mapsource or on the PNA 
would now look like the following:
00009999000099990000999900009999
00009999000099990000999900009999
22222222222222222222222222222222
11111111111111111111111111111111
22222222222222222222222222222222
99999999999999999999999999999999
99999999999999999999999999999999

There is one thing to notice however. the file "doublecheck" needs to be 
run AFTER the file "lines" and after the file (For Polygons this doesn't 
matter as we have to define a "draw  order" in the typfile determining 
what is shown on top).
POI are not possible to be shown with transparency on top of each other. 
I would propose having the file "doublecheck" only for lines and for 
Polygons. The "points" file should by default allways make one POI per 
found indicator. So a POI with amenity=restaurant; amenity=hotel should 
always be put as two points into the resulting map. The order of 
operation in the style-file "points" will determine what shows up on the 
map. On Mouseover however we can see all POI - and also searching for 
restaurant as well as hotel we are able to find the amenity=restaurant; 
amenity=hotel.
Inside the "points" file we would need a "break" command however. 
Imagine a POI, amenity=restaurant;cuisine=thai;amenity=hotel.
in the points file we define:
cuisine=thai [0x1012 resolution=20 break amenity=restaurant)
So that after finding we have a thai restaurant, we don't get the entry 
amenity=restaurant, but we would still get a dedicated POI for 
amenity=hotel.

Of course I could right now achieve all this by running several 
style-files on each input file (objects from higher mapnames will show 
above objects from lower mapnames), but this takes much more time (the 
data has to be read to memory each time) and you end up with many more 
(many very small tiles, e.g. a tile showing nothing but bridges and 
tunnels) tiles than needed.



More information about the mkgmap-dev mailing list