generating custom maps (stylesheet or typ files)

I want to create additional custom maps aside from the regular standard map from the default stylesheets. What I want are maps for cycling/mtb. But I am a bit confused with two options, 1. creating custom styles by editing the default stylesheet, or 2. creating typ files. Can somebody explain the difference of the two options? Advance thanks! -- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

On Tue, May 26, 2009 at 11:33:01AM +0800, maning sambale wrote:
I want to create additional custom maps aside from the regular standard map from the default stylesheets. What I want are maps for cycling/mtb. But I am a bit confused with two options, 1. creating custom styles by editing the default stylesheet, or 2. creating typ files.
Can somebody explain the difference of the two options?
With 1, you probably mean the mkgmap translation rules. They specify how OpenStreetMap node and way attributes are translated into Garmin point and line types and attributes in the *.img file. The TYP files are useful if you want to define custom map symbols and the like. If you think of the Garmin map data as a HTML document, the TYP file would customize the presentation, like CSS and graphical images do for HTML. If you find a good tutorial into TYP files and a nice set of tools, I'm interested. I use Debian GNU/Linux, and I am distributing a map of Finland that I would like to be more useful for cycling (but still useable for pedestrians and motor vehicles). Marko

Thanks for clarifying! On Tue, May 26, 2009 at 3:14 PM, Marko Mäkelä <marko.makela@iki.fi> wrote:
On Tue, May 26, 2009 at 11:33:01AM +0800, maning sambale wrote:
I want to create additional custom maps aside from the regular standard map from the default stylesheets. What I want are maps for cycling/mtb. But I am a bit confused with two options, 1. creating custom styles by editing the default stylesheet, or 2. creating typ files.
Can somebody explain the difference of the two options?
With 1, you probably mean the mkgmap translation rules. They specify how OpenStreetMap node and way attributes are translated into Garmin point and line types and attributes in the *.img file.
The TYP files are useful if you want to define custom map symbols and the like. If you think of the Garmin map data as a HTML document, the TYP file would customize the presentation, like CSS and graphical images do for HTML.
If you find a good tutorial into TYP files and a nice set of tools, I'm interested. I use Debian GNU/Linux, and I am distributing a map of Finland that I would like to be more useful for cycling (but still useable for pedestrians and motor vehicles).
Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

On Tue, May 26, 2009 at 9:14 AM, Marko Mäkelä <marko.makela@iki.fi> wrote:
If you find a good tutorial into TYP files and a nice set of tools, I'm interested. I use Debian GNU/Linux, and I am distributing a map of Finland that I would like to be more useful for cycling (but still useable for pedestrians and motor vehicles).
The following is a web-based TYP file editor, which has worked well for me: http://ati.land.cz/gps/typdecomp/editor.cgi Since it is web-based, you should be able to use it on a Debian system (I have always used Firefox as the browser). The cGPSmapper manual contains some more information about TYP files, and the following "Kochbuch" is also useful, if you can read German: http://maptk.dnsalias.com/Docs/Kochbuch.pdf You may find it easiest to start with one of the existing OSM TYP files, and to adapt your own from this. One thing that I have done, in order to make my maps more useful both for cycling and automobiles, is to add a definition for cycleways as Garmin 0x0f in both the lines style file and the TYP file: this appears to work correctly for routing, and differentiates better from the 0x16 code used for footways, etc. Some more work in this direction could be possible when creating routable hiking/cycling maps with a larger number of specialized ways defined. I hope this is of some help to you. Cheers.

On Tue, May 26, 2009 at 06:18:21PM +0200, Clinton Gladstone wrote:
On Tue, May 26, 2009 at 9:14 AM, Marko Mäkelä <marko.makela@iki.fi> wrote:
If you find a good tutorial into TYP files and a nice set of tools, I'm interested. I use Debian GNU/Linux, and I am distributing a map of Finland that I would like to be more useful for cycling (but still useable for pedestrians and motor vehicles).
The following is a web-based TYP file editor, which has worked well for me:
http://ati.land.cz/gps/typdecomp/editor.cgi
Since it is web-based, you should be able to use it on a Debian system (I have always used Firefox as the browser).
Are there any freely distributable TYP files that could be used as a starting point? I understood that TYP files can only be created with closed-source Windows programs (GenTYP <http://cypherman1.googlepages.com/genTYP> and cGPSmapper <http://www.cgpsmapper.com/>). I would like to contribute to a common TYP file in some way: writing translations, suggesting custom POI types (e.g., shop=bicycle, amenity=recycling), and so on. The preferred format for editing would be text, and the textual source of the TYP file would live in some public svn repository. Does that sound doable? I wouldn't touch Windows with a 10-foot pole, but I reckon that someone could regularly compile the text file to a TYP file, or even set up an automated system for doing that.
The cGPSmapper manual contains some more information about TYP files, and the following "Kochbuch" is also useful, if you can read German:
Thanks, I downloaded that "cookbook" some time ago and finally read it. I also skimmed the cGPSmapper manual.
You may find it easiest to start with one of the existing OSM TYP files, and to adapt your own from this.
Which ones would you recommend? I was able to find this one: http://svn.openstreetmap.org/applications/utils/export/garmincyclemap/4011.t... Its POI icons look quite crude, and it redefines some built-in POI and line types.
One thing that I have done, in order to make my maps more useful both for cycling and automobiles, is to add a definition for cycleways as Garmin 0x0f in both the lines style file and the TYP file: this appears to work correctly for routing, and differentiates better from the 0x16 code used for footways, etc.
These appear to be undocumented in mkgmap/resources/garmin_feature_list.csv, but the web-based TYP editor <http://ati.land.cz/gps/typdecomp/editor.cgi> says that 0x0e is Trail and 0x0f is Major trail.
Some more work in this direction could be possible when creating routable hiking/cycling maps with a larger number of specialized ways defined.
Right, it would be nice to be able to distinguish unpaved routes or mountain bike trails from paved streets on the map screen, even if the pavedness status is missing from the routing information. Thanks, Marko

+1 here On Wed, May 27, 2009 at 4:18 AM, Marko Mäkelä <marko.makela@iki.fi> wrote:
Are there any freely distributable TYP files that could be used as a starting point?
It seems many are tweaking the default styles to match their needs. A repository of style or TYP can be a good sub-project to accommodate various GPS usage (general style, cycling/mtb, hiking, marine, etc.) -- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

Hi there Marco, Marko Mäkelä schrieb:
Are there any freely distributable TYP files that could be used as a starting point? I understood that TYP files can only be created with closed-source
You could use my typ- files. http://openstreetmap.teddynetz.de/latest/teddy.typ And the maps made with it: http://wiki.openstreetmap.org/wiki/User:Computerteddy -- Viele Gruesse Computerteddy

On Tue, May 26, 2009 at 10:18 PM, Marko Mäkelä <marko.makela@iki.fi> wrote:
Are there any freely distributable TYP files that could be used as a starting point? I understood that TYP files can only be created with closed-source Windows programs
You will note that the online TYP editor I mentioned above has Perl source code available with a BSD license: http://ati.land.cz/gps/typdecomp/
I would like to contribute to a common TYP file in some way: writing translations, suggesting custom POI types (e.g., shop=bicycle, amenity=recycling), and so on. The preferred format for editing would be text, and the textual source of the TYP file would live in some public svn repository. Does that sound doable?
To set this up in a multiple platform/open source environment would require extensive modification of the above Perl code, or a new implementation of it in another language (Java? Python?). If you or someone has lots of time available, this would be a worthy project. :-) If you were to work directly with the binary TYP file, you could repeatedly edit it using the online editor: http://ati.land.cz/gps/typdecomp/editor.cgi To keep the text up to date, you could also decompile the TYP file from the above site.
Which ones would you recommend?
I started experimenting with the TYP file created by Carsten Schwede: it it quite comprehensive. I then created a more minimal file from scratch, with the intention of getting a map that displays quickly and can be reasonably used both for motorized and non-motorized transport. If you are interested, I could send you my TYP file and my style files directly by e-mail. (I do not have a Web presence where I could otherwise post these items.) Cheers.

Hi Clinton, hi ComputerTeddy, On Wed, May 27, 2009 at 04:47:55PM +0200, Clinton Gladstone wrote:
You will note that the online TYP editor I mentioned above has Perl source code available with a BSD license:
Perl is my favourite non-native computer language, but I don't get to use it often. Some people say that Perl is a write-only language, though. :-) If the TYP format is as simple as it seems, it might be worthwhile to generate the TYP file with a simple self-contained and self-documenting Perl script. The source would be text, and comments could be embedded. Perl is reasonably cross-platform. Admittedly, it could be better to stick to Java in the mkgmap context. I didn't take a look at the editor source code yet.
I started experimenting with the TYP file created by Carsten Schwede: it it quite comprehensive. I then created a more minimal file from scratch, with the intention of getting a map that displays quickly and can be reasonably used both for motorized and non-motorized transport.
I agree, I took a look at the teddy.typ via the above editor, and it looks comprehensive. The only thing I find lacking is translations: teddy.typ only contains English and German. I could do Finnish and Swedish, and possibly some other languages with the help of online dictionaries and wikis. Does anyone know if the code page selection really is a per-file thing, or if it can be done per language? Are there any TYP files with Russian, Bulgarian or Greek labels, for example?
If you are interested, I could send you my TYP file and my style files directly by e-mail. (I do not have a Web presence where I could otherwise post these items.)
Yes, I am interested. I would like to define a few POI icons (such as bike shops, bike parking and recycling bins) and possibly more colourful line types to distinguish cycleways from footways and to visualize pavedness. For everything else, I've been so far happy with the defaults of the Edge 705. Marko
participants (4)
-
Carsten Schwede
-
Clinton Gladstone
-
maning sambale
-
Marko Mäkelä