I have a question about TYP files and styles, several questions actually. I always download the OSM_generic_new_style maps for my areas of interest, Thailand, Alaska, New York State, etc., and in general I like the way features and POIs are rendered. However there are several things I’d like rendered differently. Tertiary and unclassified highways for starters, amenity=place_of_worship with religion=buddhism, for another. And there are a quite a few more. I have done extensive reading in this forum, in various OSM wikis, and elsewhere and have run into problems with both my understanding and in the results I’ve been able to achieve…
I have successfully compiled and created maps with mkgmap and have been using TYPViewer to inspect and modify TYP files. But it seems the slightest change I make in a TYP file has effects that are unintended. For example, I would like to see tertiary highways rendered in color so as to make them stand out better. The base TYP file I’ve been working with is the one that comes along with the Thailand country download from the Lambertus site, 24983.TYP. I edited this TYP file with TYPViewer and since tertiary highways are not included in the 24983.TYP file I added a polyline of type 0x005, made it 4 pixels wide and chose a pale yellow color with grey border. I determined the type code for highway=tertiary by inspecting some other TYP files I found in various places on the Internet. At first glance my maps looked much better than the standard ones. Then I noticed that bridges are no longer visible in my compiled maps, neither in Basecamp nor on my Montana GPSr. Obviously, being a mapper, bridges are something I want to see on the GPS while traveling. I noticed too that with the standard unmodified 24983.TYP, bridges show on my Montana but not in Basecamp.
Why do bridges disappear in maps with my customized TYP file? Furthermore, why do bridges show up on my Montana and not in Basecamp with the standard TYP file?
It is also possible to tell mkgmap to use styles found in a user-specified style-file. If you do not specify a style-file, the default or built-in line styles are used. They include this directive:
highway=tertiary [0x05 road_class=1 road_speed=3 resolution 20]
Does this style interact with the settings in a TYP file and if so how? The polyline I added is type 0x005 but all of these have one less zero, 0x05. What is the difference?
In general, why would one use styles as opposed to TYP files to control rendering?
The default mkgmap line styles also include these statements:
highway=unclassified [0x06 road_class=0 road_speed=3 resolution 21]
highway=living_street [0x06 road_class=0 road_speed=1 resolution 22]
highway=residential [0x06 road_class=0 road_speed=2 resolution 22]
I know the OSM_generic_new_style maps render living_streets differently. Given the above, how is that accomplished?
I would like to make highway=unclassified a different color in my maps but the 24983.TYP file does not include a polyline type 0x06. After the problems I had when adding the type 0x005 I want to learn more before proceeding. The OSM_generic_new_style maps render unclassified, residential and tertiary highways the same way.
Is this because the styles are practically identical? Moreover, do the OSM_generic_new_style maps use styles at all?
In addition there is this other default style that is of type 0x06 as well except that it is a road_class=1.
highway=minor [0x06 road_class=1 road_speed=3 resolution 21]
*What exactly is road_class in the above directives? Is road_class more properly called a sub-type?
*
The info that is scattered here and there on the Internet is not organized well and does not begin to present a comprehensive picture of how this all works together. To make matters worse, much of the data specific to Garmin GPSr units is outdated and talks about Mapsource, a product that is no longer being maintained or updated.
I know there is a lot of expertise available in this forum. Could someone please take the time to explain how these various pieces fit together? If I can get answers to the questions I posed above, that will be a big start. Some of my questions are specific to the maps from Lambertus, which is why I started here but maybe I should post this question on the main Garmin forum page?
Thanks in advance for your time…
Cheers,
Dave
PS: The command line I’m using to compile the maps is here:
java -Xmx1000m -jar mkgmap.jar --latin1 --family-id=24983 --name-tag-list=name:en,int_name,name --gmapsupp --description="North-TH" --country-name=THAILAND
--country-abbr=TH --index --location-autofill="is_in,nearest" --copyright-message="ODbL by OSM contributors" --link-pois-to-ways --reduce-point-density=4
--reduce-point-density-polygon=8 --merge-lines --route --drive-on-left --check-roundabouts --check-roundabout-flares --nsis --process-destination --poi-address
north-th.osm 24983.TYP