Talk:Mkgmap

From OpenStreetMap

Jump to: navigation, search

Discuss Mkgmap here:

Contents

Suggesting tags

I've just tried this out, and it works really well! Thanks! Is there anywhere I can put suggestions for improvements, like rendering railway=subway the same as normal railways, rendering highway=service, and rendering leisure=common the same as leisure=park? Gravitystorm 17:12, 6 January 2007 (UTC)

Good point, I've added my OSM email page. Adding suggestions here will work too! The next version will have many more renderings, based on the database in OSMGarminMap. I'll make sure your requests are included. Thanks. AcousticNewt 18:50, 6 January 2007 (UTC)

JOSM downloading memory problems

Works great for me! Thanks a lot. It's way more than I expected, as even the Find functions work with the OSM data. Two comments - I've uploaded a 160K file, so I haven't hit your predicted size limit (70-80K) yet. My limitation now is trying to get JOSM to download more data - it's sucking down a lot of memory ~ 460Mb or so and slowing up badly on my Powerbook. Secondly, I get more than one level of zoom - it displays at 0.3 miles, which I calculate is roughly 500m, and there's three or four useful levels of zoom below that. I'm using a Legend Cx, by the way. Phillip@comsomol.org 23:47, 11 February 2007 (UTC)

Sorry I didn't see your comment until just now. By now most of the arbitrary limits in mkgmap are gone anyway. For downloading, instead of using josm to download areas, you might want to try getting data directly. I wouldn't mind adding an option to mkgmap to download an area directly too. Thanks for the zoom info, I'll modify the main page as it seems to vary a lot between different models. AcousticNewt 13:43, 24 February 2007 (UTC)

Show segments which have no ways (out-of-date)

It is possible to show the segments which have no ways on garmin? This would it make easier for mapping with bike. Normally I add the ways first if I finished a region --waschbaer 18:40, 23 February 2007 (UTC)

Not possible with mkgmap currently, but I shall look to adding the option in the future. AcousticNewt 13:43, 24 February 2007 (UTC)
I found as solution, to add a second map with sendmap. For these second map I used OSM_Map_On_Garmin. So I can also select if I want to have the featured mkgmap-img or the complete map done by cgsmapper. --waschbaer 12:05, 24 March 2007 (UTC)


basemap bug

Discussion moved from the article page:

On my Vista Cx, if I switch off the basemap, the OSM map will display out to 1.2 miles/2 km. Bruce89 12:41, 20 January 2007 (UTC)
Interesting, although thats not the case on my Legend. AcousticNewt 13:21, 20 January 2007 (UTC)
Also true for the GPSMap60. When the basemap is not hidden the OSM data disappears above 500ft.

Attribution

I really like this, it's simple to use and produces great results. Is there any way that somehow the OSM attribution could be incorporated? In the future I'd like to make some img. files available for download, but wouldn't like to do that until I could comply with OSM licensing. Dmgroom 00:15, 19 April 2007 (BST)

It already includes an OSM attribution in the .img file in the place where copyright messages are placed. AcousticNewt 23:52, 22 April 2007 (BST)
OK, sorry, these obviously don't get displayed when I view the image file in PocketMV.Dmgroom 14:28, 23 April 2007 (BST)

forest and park green areas + consistent highway colours

I use the map from Computerteddy and it works great, thank you for the good job. I have some suggestions for showing the map.
From Mkgmap 198 to 200 you have changed the drawing of forest and park, it would be good if park, forest and wood are all green areas.
In the most Maps for Mapsource you have highways in blue, main streets in red and other streets in black and different thickness, it is very clearly in that way. The OSM Map is all in black except the highways, the same type of drawing like the most maps would be more consistently.
--Stefan 22:34, 30 August 2007 (BST)

Hi, I think the problem there is that I changed the feature definition file a bit and the Computerteddy generated maps, use a modified feature_map which didn't work. This lead to the differences in the areas I think. I certainly didn't intentionally change anything. I'm sure about the streets, they are just the colour that they are, it may be the same problem. ..Steve (AcousticNewt 20:41, 2 September 2007 (BST))
On a similar note, does the program handle Landuse: Basin. On a recent trip to the Avon, the basin at Stratford on Avon did not show up. --TTTPPP 12:20, 10 September 2007 (BST)
Not currently, should be fairly easy to add it ..Steve (AcousticNewt 22:43, 11 September 2007 (BST))

BUG: Lines are shifted

Long lines (often roads and coastlines) are shifted on the lowest (24-bit) layer in the resulting IMG. On all other layers they are on right place  :) Here is an example. Screenshots: buggy layer 0, right layer 1. --Liosha 10:19, 25 November 2007 (UTC)

There are some very long ways in there and that is the problem. It will probably be best from a practical point of view to split those ways into smaller pieces. But as far as mkgmap goes I can probably split the ways up, I already do this when there are too many nodes in a single way, so I imagine that its not a big problem to split them when they cover too much ground as well ..Steve AcousticNewt 20:04, 28 November 2007 (UTC)
I've just tried r417, problem still exists. Is t possible to split long ways automatically? --Liosha 17:31, 5 December 2007 (UTC)
This problem has not been addressed in r417. They can be split for size, but this has to be done earlier on in the process than is currently done to fix this particular problem. I'll post here when this is done. ..Steve AcousticNewt 20:14, 5 December 2007 (UTC)
Try r423, that might now work, it does for my test cases anyway AcousticNewt 23:42, 5 December 2007 (UTC).
Seems r423 works right, thanks. But probably there is the same problem with large polygons --Liosha 06:47, 6 December 2007 (UTC)
Found only one buggy example --Liosha 07:12, 6 December 2007 (UTC)
Oops, stupid bug. Fixed in SVN and will be in the next build AcousticNewt 21:24, 6 December 2007 (UTC)
So now polygons should also be split for size in the next build ..Steve 23:11, 6 December 2007 (UTC)
Still a bug with large polygon splitting, layer 0 again. Part of lake Baikal as example --Liosha 06:01, 7 December 2007 (UTC)
OK I found a bug that was not specifically to do with the splitting that causes the problem. Your example works now in SVN.
r433: there is no shift now, but some parts of polygon are missing on layer 0. Tested with the same example (reg04.osm) --Liosha 07:27, 9 December 2007 (UTC)
I added some code to investigate another bug, I've changed it now and all the polygons should appear again. ..Steve AcousticNewt 19:36, 9 December 2007 (UTC)

'Bad input file format' message

I got a problem by converting the actual planet.osm dated 09.05.2007 (also the version 02.05.2007) with mkgmap. By calling "java -Xmx1500M -jar mkgmap.jar planet.osm" i got the message "Bad input file format". What can I do? Kokstef 13:36, 12 May 2007 (BST)

I had the same message with a much smaler osm-file. May it is possible to get the line number of the osm-file there it happens? --waschbaer 15:48, 10 June 2007 (BST)
Firstly, a whole planet file is way too big to process so you need to use one of the extraction utilities to select an area from it. Still that is not the cause of 'Bad input file format' errors. These might be caused by attempting to to use the compressed file -- any file used must be uncompressed. It could just be a bad file of course too. I'd like to add some code to detect the various problems, not sure how easy it is to get actual line numbers, but could do better than it does. AcousticNewt 22:38, 11 June 2007 (BST)
May it is easier if I send you an example that wouldnt work? --waschbaer 11:56, 19 June 2007 (BST)
Yes you certainly can send me an example. I forgot to add that a common cause would be the file not being in utf-8, this was a problem with the planet.osm files (perhaps still is?) and you had to run UTF8Sanitise on them.
I was having this problem until I noticed the XML was missing the closing </osm>. Seems like a bug in osm-subset.pl. Firefishy 10:32, 18 July 2007 (BST)

Zoom levels

Any estimate in when different zoom levels will be ready in mkgmap? (apart from "when it is done"!) Great program by the way! It really has helped my mapping. --TimSC 11:22, 28 May 2007 (BST)

Pretty soon now... In fact if you build from svn see mkgmap/dev a basic multiple zoom map will be produced. AcousticNewt 22:38, 11 June 2007 (BST)

Doesn't seem to work for recent UK planets (Now fixed)

The latest UK planet files result in IMG files that don't work. For instance this one doesn't work made from the UK data. The GPS doesn't recognise the map, and QLandkarte crashes if it is loaded. Bruce89 14:26, 31 May 2007 (BST)

Having just tried it on data from 30th may, I can confirm that it produced an unrecognisable file as far as my GPSmap 60CSx is concerned. Fil 18:11, 31 May 2007 (BST) -- Ah, I see that Bruce89 was actually referring to my attempt -- I've since re-run it and it didn't work with that either. I was running this on an AMD64 system BTW, in case that makes a difference.

I have also tried on an AMD64 machine with both Java 1.6 and GCJ. No results. Bruce89 18:42, 31 May 2007 (BST)
I also produced a file that didn't work with data from an April planet, using an AMD XP+ processor- sorry for vagueness, but I thought it was just me being stupid. Now I see it's a more general problem. Phillip@comsomol.org 15:20, 7 June 2007 (BST)

This is now fixed in version r173. There was two problems. The first was that the UK is just a lot bigger than it was just a couple of months ago and an area of the file was overflowing. The second was that one of the subdivisions was too big. The top bit of the 'width' field is used as a flag to say that the list of subdivisions has ended. Everything after that would not appear in the file. AcousticNewt 12:20, 10 June 2007 (BST)

Doesn't seem to work for recent Germany file

the latest germany snapshot from http://openstreetmap.gryph.de/germany/germany-070823.osm.bz2 dont work for mkgmap-r188 and also not for mkgmap-r193 with the error message:

 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -6
       at uk.me.parabola.mkgmap.general.MapArea.pickArea(MapArea.java:330)
       at uk.me.parabola.mkgmap.general.MapArea.split(MapArea.java:140)
       at uk.me.parabola.mkgmap.general.MapSplitter.splitMaxSize(MapSplitter.java:152)
       at uk.me.parabola.mkgmap.general.MapSplitter.split(MapSplitter.java:85)
       at uk.me.parabola.mkgmap.main.MakeMap.makeMapAreas(MakeMap.java:182)
       at uk.me.parabola.mkgmap.main.MakeMap.makeMap(MakeMap.java:98)
       at uk.me.parabola.mkgmap.main.MakeMap.main(MakeMap.java:71)

java version is build 1.5.0_10-b03 --waschbaer 11:40, 25 August 2007 (BST)

Hi. Thanks for reporting this. I've also been emailed this bug and I'm working on the fix. I'll check the fix with your example osm file too. AcousticNewt 13:15, 25 August 2007 (BST)
Oh well the problem was actually a different one, but it is now fixed too. Look out for version 197 and above.

Find function on GPSr (Fixed)

The map works really well on a Garmin Legend Cx, but the find function behaves a bit oddly. Searches often bring up the same POI multiple times. This does not appear to be a problem in the OSM data.

Hmmm yes. I haven't looked at find for a while, it didn't used to do that. Thanks, I'll look into it. AcousticNewt 23:09, 29 August 2007 (BST)

I found the same problem with the find function bringing up multiple instances of the same points repeatedly--Petz 13:26, 1 October 2007 (BST)

Yes it is definitely a problem, but I don't know what causes it. It only happens when there is more than one zoom level in the map and when there are enough other features on the map. ..Steve
This should be fixed in version 313 ..Steve

Sea areas

A couple of side notes (I have no idea how easy/hard these are to do!) Would it be possible to make the sea an area as it is in the base map? I believe it's rendered as the coastline in Mkgmap. Would it be possible to select the area to create a map for by simply entering a lon/lat bounding box into Mkgmap?

Making the sea an area is the right way to do it certainly. I'm not entirely sure how to do it though. If anyone wants to help on that it would be great. AcousticNewt 23:09, 29 August 2007 (BST)

When I made a Garmin map of an island using GPSMapEdit and cgpsmapper, I had the same problem.

I created a coastline first. Then I tried to make a sea polygon in the shape of a rectangle connected on one side to a "hole" in the same shape as the coastline. The shape was somewhat like a ring with a cut in it, i.e. a line around the island with start and as separate nodes at the same position and a similar line around the outer rectangle, the start of the island line connected by a straight line with the end of the outer line and vice versa.

IIRC this did not work, maybe because the island coastline had too many points (around 8000). As my next and successful try I cut the sea polygon into two parts. I chose one point at the west coast of the island and one at the east cost and connected these to the outer rectangle. With these two sea polygons, my map is displayed correctly on a GPSMAP76CSx. The display has one problem, though. When I zoom out so that the outer rectangular border of my map can be seen on the GPS device, it fills the area outside my map with crossed lines to show that this area is not covered by the map. The Garmin City Navigator map is shown only if no part of my map is on the screen.

I think mkgmap could do the same to create some sea polygons that completely fill the area between coastline and tile border.

The algorithm to cut the coastline into pieces could use a point in the center of the land area, draw some lines (rays) from this center point to the border of the map tile, cut the coastline at the outmost intersection with this ray and connect it with the intersection of the ray with the tile border to create sea polygons.

-- Bomm 01:35, 19 June 2008 (CET DST)

Garmin eTrex Vista HCx

The Garmin eTrex Vista HCx is the newest model in the eTrex line and came out in Summer 2007. It's $100 cheaper and has better battery life than the 60CSx but with similar sensitivity.

You MUST use a MicroSD card to use Mass Storage Mode to upload maps. You can't use the internal memory.

Summary: mkgmap works!

I cheated a bit since I did not download OSM data, but instead generated it from TIGER. Interestingly, the at first the output from the tiger generator did not work. I had to open it up in JOSM (which accepted the file just fine) and then re-save it. Then mkgmap worked. Perhaps the XML is off a bit or the generator makes an old version.

Then I uploaded Manhattan NYC to my unit. If you zoom in, it works really well, full street detail. Zooming way out, for some reason all you see is the outline of the city and bridges (not major streets or highways), and if you are in the middle, you see nothing. I'll take a look at the data later and see how it's tagged, and upload screen shots.

--Nickg 16:34, 2 September 2007 (BST)

The HCx sounds cool... I'd be interested in finding out more about the problems you see, I've recently fixed a few problems that might affect things as you zoom out. ..Steve. -- AcousticNewt 22:43, 11 September 2007 (BST)

"mapsource" label

In the lower left corner of the screen (just below the scale) there is the "mapsource" label. Can that be changed to a meaningful "openstreetmap" (or "OSM") or is that label displayed as such by the GPS unit regardless of where the used map data comes from? --Stefanb 11:58, 28 September 2007 (BST)

Hi. That label is just what the GPS unit displays. There is no way to change it as far as I know. ..Steve --AcousticNewt 19:40, 28 September 2007 (BST)
I think this is because there is a ROM-based Garmin map on the unit (on my Vista CX at least), which you cannot delete (obviously :)). And an observation: when using high-level zoom, the text changes from "mapsource" to "overzoom" --Breki 14:54, 2 October 2007 (BST)

Rivers with new versions of mkgmap

Hi,

Rivers tagged as areas with waterway=riverbank and natural=water are now rendered only as a blue line ploygon and no more as a blue area. How should they be tagged to be better rendered ?

By the way, thanks for this wonderful work. FredB 23:26, 10 October 2007 (BST)

I've just made a change so that if something could be both a line and a shape, due to conflicting tags, then the polygon will be preferred. That may not be the only problem though, if not could you point me to an example. This should show up in tonights build. AcousticNewt 19:45, 13 January 2008 (UTC)
I have a Garmin Vista, and riverbanks (i.e. "shaped rivers") worked fine in past versions up to r506; now in r519, they are no longer filled. Oh, and forests are still rendered as parks, and vice versa. (Otherwise, a great program indeed - I wouldn't have joined OSM without the possibility of using the maps on my GPSr.) Dawidi 10:28, 12 January 2008 (UTC)
I understand the riverbank, see above, should be fixed. I don't get the park/forest swap though - parks near me show up as parks, do you have an example? ..Steve AcousticNewt 19:45, 13 January 2008 (UTC)

New Version doesn't work

Don't know, where to put bugs... Hope this is ok here.

I've downloaded version r291 and some data with josm (0.5-data; http://www.openstreetmap.org/index.html?mlat=48.0125646172838&mlon=7.779960847340263&zoom=9). mkgmap produces a file, but GPSmap 60CSx doesn't show the map (but it recognizes it). With the old version everything worked fine... Any ideas? --Kumakyoo 11:34, 12 October 2007 (BST)

Yes it just doesn't work... I'd stick to version 251 for now, the download section has been updated. ..Steve

tried latest as of r296, does not work. cz2.osm is produced with extract-polygon from planet-latest.osm. api0.5.

walley@ol-grezl:/mnt/hdb/poly$java -jar mkgmap.jar cz2.osm

   Exception in thread "main" java.lang.NullPointerException
       at uk.me.parabola.mkgmap.general.MapLine.addToBounds(MapLine.java:75)
       at uk.me.parabola.mkgmap.general.MapLine.setPoints(MapLine.java:45)
       at uk.me.parabola.mkgmap.reader.osm.FeatureListConverter.convertWay(FeatureListConverter.java:136)
       at uk.me.parabola.mkgmap.reader.osm.Osm5XmlHandler.endElement(Osm5XmlHandler.java:145)
       at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
       at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
       at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
       at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
       at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
       at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
       at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
       at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
       at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
       at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
       at javax.xml.parsers.SAXParser.parse(Unknown Source)
       at javax.xml.parsers.SAXParser.parse(Unknown Source)
       at uk.me.parabola.mkgmap.reader.osm.Osm5MapDataSource.load(Osm5MapDataSource.java:86)
       at uk.me.parabola.mkgmap.main.MakeMap.loadFromFile(MakeMap.java:136)
       at uk.me.parabola.mkgmap.main.MakeMap.processFilename(MakeMap.java:44)
       at uk.me.parabola.mkgmap.main.Main.processFilename(Main.java:84)
       at uk.me.parabola.mkgmap.main.CommandArgs$Filename.processArg(CommandArgs.java:285)
       at uk.me.parabola.mkgmap.main.CommandArgs.readArgs(CommandArgs.java:109)
       at uk.me.parabola.mkgmap.main.Main.main(Main.java:55)

--Walley 15:26, 12 October 2007 (BST)

Hi. If you could give me a link to the cz2.osm file that didn't work, I'll make sure that it does. ..Steve (AcousticNewt 21:25, 12 October 2007 (BST)). Updated: should be fixed in version 298.
I will be able to put it somwhere on teh web on monday if you still want it, but yes, version 298 works. THANK YOU! --Walley 09:14, 13 October 2007 (BST)
I've fixed it and have a good test case for the problem, so there is no need to post the osm file. Thanks ..Steve
298 Works. Thanks a lot for this fast "support". :-) --Kumakyoo 19:19, 14 October 2007 (BST)

Putting elevation contours into Garmin

Hello AcousticNewt. Please check out the Srtm2Osm tool I have just published. It could be used to generate relief data for Garmin maps. Since you have a lot of experience on Garmin features, you could suggest to me the best way to tag contours so that it would be easy for Mkgmap to translate them to Garmin contours.--Breki 18:43, 14 October 2007 (BST)

Hi. That looks really good. I got it to work on linux under wine and ran with the example area given on the srtm2osm page. I put a hack into mkgmap to put contours into the map along with the heights version 307 and it works well enough as a first attempt. I'll add more discussion at Contours. ..Steve (AcousticNewt 22:55, 14 October 2007 (BST))

Precedence of mapfeatures

I'm trying to prepare a cyclemap (with cycleways rendered red). I'd like to render roads with cyclelanes different from other roads, i.e:

  • Road A: "highway=residential"
  • Road B: "highway=residential, cycleway=lane"

My first try was:

polyline|cycleway|lane|0x0b||
polyline|highway|residential|0x06||

But this doesn't work. Both roads are rendered similar and the cycleway tag is ignored. I also tried to change the order of these two statements with the same result.

The same applies for "bicycle=yes" tags.

Therefore, I'd be happy to have mkgmap select the rules according to the order in the .csv-file. Is this difficult to add? --Kumakyoo 14:20, 18 October 2007 (BST)

Yes that sounds like a good idea. I should easily be possible to do something like that, I may have to think it over for a couple of days though. ..Steve (AcousticNewt 20:24, 18 October 2007 (BST))
Thats OK. I'll wait ;-) --Kumakyoo 21:03, 18 October 2007 (BST)

Routing

Is it possible to enable routing? I know that its possible with different conversion software, such as what I found here : http://www.malsingmaps.com/wiki/index.php/Making_A_Map_Routable . Thats really the only big thing thats still missing from OSM on Garmin. --Petz 12:31, 31 October 2007 (UTC)

Yes it would be great to do that, the trouble is that there is only a limited amount of information available about the extra information that is required to make the map routeable. ..Steve (AcousticNewt 18:36, 4 November 2007 (UTC))

libgarmin decodes the oneway flag on roads and the routing graph node positions. --Usm78 23:35, 24 March 2008 (UTC)

Is there any news about routing on Garmin? I know from the german mailing list, that lots of people (including myself) are extremely waiting for this. -- dieterdreist 13:41, 23 April 2008 (UTC)

There are many details of the routing sections that are now known. Alex of the libgarmin project and Robert Vollmert have made a lot of progress and their work is in the 'display' svn, where there is a utility to display the sections which works well on some maps.
There would probably be enough known to get some simple examples working. The main problem is, I believe, that routing needs an extended TRE header compared to what is used in mkgmap currently. The bytes at offset 0x9a need to be set correctly and I don't know how to derive them.. Although in the John Mechalas document they are speculated to be an encryption key, that can't be right (or complete) as they occur in un-encrypted maps (mkgmap doesn't and will not produce encrypted maps). ..Steve (AcousticNewt 15:07, 26 April 2008 (UTC))

cgpsmapper failure

cgpsmapper can't convert the .img tiles generated by mkgmap into shapefiles. The error message is

cgpsmapper0081static: rgn_header.cpp:91: void RGN_element::Read(xor_fstream *, Coordinates, IMGfile *): Assertion `((rgnType >= 0x20 && rgnType <= 0x27 ) || rgnType == 0x2f || rgnType == 0x1d || rgnType == 0x2a || rgnType == 0x2c )' failed.

I'm afraid I cannot guess what it is that cgpsmapper is complaining about here. Is it every file or just a few? I am not using cgpsmapper while developing mkgmap and so I am not going to be able to look into it. I'll try out a fix if you have any idea what the issue is. ..Steve (AcousticNewt 18:36, 4 November 2007 (UTC))

Version 519 and POI in Gramin E-Trex

Hi, I use the files from User:Computerteddy which are created with mkgmap 519. I can not choose the menu entry: "Point of Intressts" from the search menu. It is disabled. So I can not search the nearest supermarket ....

The older versions (used by Computerteddy) works for me. Device: Garmin E-Trex Legend. Sven Anders 13:14, 13 January 2008 (UTC)

Is this a particular tile, or the whole Germany map? I'm probably going to need more information as my own maps don't seem to have this problem. AcousticNewt 20:31, 13 January 2008 (UTC)
Tile Number: 63255216 [1] The Whole Germany-File does not fit to 8MB Garmin devices. Sven Anders 11:56, 14 January 2008 (UTC)
Right. I see the same problem that you do with the downloaded one, but if I compile it myself, then it is OK. So I'm thinking that either it is a problem thats been fixed, or it is the way that the maps were generated.
I've just fixed a problem that caused similar symptoms, not sure if it was the same problem, but it definately was a problem. AcousticNewt 18:48, 19 January 2008 (UTC)

Map background

Hi, I have downloaded World maps for Mapsource from User:Computerteddy. This doesn't work correctly. I think maps generated by Mkgmap lack background polygon (type 0x4B). It's OK when there are other objects, but when map is totally empty Mapsource crashes.

I've now added background polygons, on the other hand empty maps are quite probably never going to work very well and we should try to avoid them altogether. ..Steve AcousticNewt 00:38, 20 January 2008 (UTC)
Is it possible to add custom-shape background? Or just to disable it? --Liosha 12:13, 29 January 2008 (UTC)
Its not possible at the moment. What are you trying to do? I guess there needs to be a way of making a transparent map.

Converting multiple .img files to gmapsupp

I want to take the .img tiles from Computerteddy to create a gmapsupp of Europe. I wondered what the way is to specify that, because putting all of the .img file names into a options file and then calling that doesnt seem to work, and theres a limit to the length of the command line, so that doesnt work either? PS: I want to merge 926 img files. --Petz 17:41, 24 January 2008 (UTC)

You need to create a options file as below, with an input-file line for each file in the set along with the gmapsupp option. Pass the file to mkgmap with the -c option.
gmapsupp

input-file: 63243936.img
input-file: 63247525.img
input-file: 63253506.img
input-file: 63364845.img
input-file: 63364846.img

Cheers, that worked!! I generated a map of West and Central Europe, quite amazing that it only comes to 160mb. Is anyone interested in getting that file as well? I might put it up on my webserver.--Petz 20:42, 24 January 2008 (UTC)

POI not being found on GPS

I just checked out the img file I created on my GPSMAP 60Csx, and altough there are plenty of pubs in my neighbourhood, when i press find, and click on POI, the GPS doesnt return any of those nearby POI, but stuff 50km away as the closest. What's going on? My img come from Computerteddy's --Petz 20:56, 24 January 2008 (UTC)

There was a bug fixed in version mkgmap-r526 that would cause some kinds of POI to not show up. I think the latest computerteddy maps are from before this. I think however that there may be another problem with those maps as a lot of points appear to be just missing.

I am going to try and recreate the .img files from scratch using Computerteddy's OSM tiles, do you reckon that will yield a better result? Or is the POI problem also present in his .osm tiles? --Petz 09:52, 25 January 2008 (UTC)

Yes, I now got all POI in the .img. Will try to post it in this weekend. Cheers for mkgmap. --Petz 22:03, 25 January 2008 (UTC)

Well I was too late to reply :) But yes, recreating will work as the problem is not in the osm files. AcousticNewt 00:21, 26 January 2008 (UTC)

Updating an available gmapsupp.img

Ok, I concede this may be complete nonsense:

java -Xmx750M -jar mkgmap-r530/mkgmap.jar --description='Deutschland' --gmapsupp gmapsupp-copied.img new-data.osm

The idea was to update a huge map file with some new data freshly mapped.

What I get is this:

SEVERE (GmapsuppBuilder): could not create MPS file as it already existed (aledgedly) Could not create gmapsupp file

Is there anywhere some more information about the general .img-files with numbers as names, and why the numbers, and how they relate to gmapsupp.img, and whether this is a special name for Garmin?

BTW: I use a Garmin Legend HCx which works just fine otherwise with generated maps.

--HaraldK 10:28, 27 January 2008 (UTC)

Yes the gmapsupp.img is just a name that Garmin uses. The .img file format is an archive format, similar to a zip file for example, that can contain other files.
The individual maps that comprise the gmapsupp file are themselves .img files which contain serveral other files. These are all named with a number, again that's just the way it is done.
To do what you want to do, then you would need to extract all the files from the gmapsupp.img, remove the ones you want to update and combine the remainder altogether with the new ones. This is not possible with mkgmap, although the tools are there to create such a program fairly easily - look at CopyFile under the test directory for example.
If you just want to add files to the gmapsupp, rather than update, then it is now possible with mkgmap using the command you tried. I made a fix to ignore the MPS file that was causing your error. This version can be obtained from subversion and will be in the next nightly snapshot.
AcousticNewt 15:01, 27 January 2008 (UTC)

Various comments

Cool Tool

Thanks for the great tool. I used the maps of ComputerTeddy as well, but as I was more interested in Cycle Maps I started to play with it a bit. I'm watching the map right now and am very pleased to see all cycleble ways even in low zoom levels. --SlowRider 20:28, 4 February 2008 (UTC)

Thanks for the comments, I've done an initial reply to everything below. ..Steve AcousticNewt 21:54, 5 February 2008 (UTC)

Config file for cyclists

I tried to create a config which renders ways less convenient for cyclists as dashed lines, but renders ways convenient for cyclists as thin black lines even at lower zoom levels. Unfortunately the wiki does not allow uploading files other than image formats. Temporarily I placed it here. It also works very well to render tracks with tracktype set other than tracks without tracktype set. I just placed tracktype=grade1 before highway=track. I enjoy it :) .

Thanks, I've downloaded that. One day I'll make a way of having lots of different styles built in and and referenced by name.

Creating custom street types

I have a somewhat heretic question. Was it possible to create custom way types? I like the thin black lines for cycleways, but they now read as "Line" on the device. It would be cool to redefine it as something like "Cyclable Way". Plus was it possible to redefine its colour? It would be cool to paint tracks of grade 5-3 as gray lines, grade 2-1 as brown, and service+cycleways as black lines.

  • It is possible to redefine the colour and the name of any of the line features using a custom type file (TYP file). It may not work on all units though. Its another undocumented format, but I believe I know enough to create simple coloured styles for lines, though I've not actually tried yet.
    • Not that important for me, but anyway: One user complained that the black lines do not provide a good contrast in night mode. He asked if it was possible to render them in brown colour. Unfortunately there are only thin dashed lines and fat lines predefined in brown, but not thin continuous lines. Maybe a further case where you might be attempted to tweak the line styles. --SlowRider 21:25, 6 February 2008 (UTC)

Tweaking zoom levels

I also tried getting better results by mapping resolutions to zoom levels. After some fiddling I asked someone who already tried it. After some short experience exchange, we decided that it was better to give up. That's not related to mkgmap directly, but maybe it's worth mentioning in its docs that it is very difficult to actually improve the map by tweaking those settings.

  • Well I don't want to stop people trying ;) but Jochen and the other contibutors have done a good job and it works quite well. But again there is room for different styles, the current one works better on a larger screen (eg QLandkarte, and perhaps the larger Garmin devices) than on the smaller ones in my opinion and one style will never be the best for all situations.
    • I bet you are right. I guess you're talking about User:Joto. We did the first tweaking some months ago as we wanted to improve the default rendering.

Mapname option won't work

Neither --mapname=abcdefgh nor --mapname="abcdefgh" work for me. Not an issue as I have written a script anyway. But it's a feature that doesn't work as advertised :) .

  • Perhaps the advertising is wrong then... as it has to be an eight digit number. OK, thats not entirely true and I will fix that stack trace at least, but you should stick with a number. If you want to give a readable name to the name then --description is the one to use.
    • No, the advertising is right. I simply ignored "Garmin maps are named by 8 digit numbers" and interpreted it with "Garmin maps are named by 8 characters". My fault :) .


Example:

java -mx2048m -jar ../mkgmap-r530/mkgmap.jar  --mapname="abcdefgh" --description=osm-map-ce --map-features=../mkgmap-config/GPSMap60csx-TrekkingBike-features.csv  --latin1 --gmapsupp MyAreaHuge.osm
Exception in thread "main" java.lang.NumberFormatException: For input string: "abcdefgh"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Integer.parseInt(Integer.java:447)
        at java.lang.Integer.parseInt(Integer.java:497)
        at uk.me.parabola.imgfmt.app.map.Map.createMap(Map.java:92)
        at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:69)
        at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:45)
        at uk.me.parabola.mkgmap.main.Main.processFilename(Main.java:102)
        at uk.me.parabola.mkgmap.CommandArgs$Filename.processArg(CommandArgs.java:348)
        at uk.me.parabola.mkgmap.CommandArgs.readArgs(CommandArgs.java:118)
        at uk.me.parabola.mkgmap.main.Main.main(Main.java:78)

Without the mapname option it works.

Street name search

Currently we do not know how to make the map searchable for street names. Very annoying if a passenger asks you for a street and you cannot answer his question. But here's a question: Wasn't it possible to extract one node of any street and make it a POI in the map? It has some drawbacks, I know, but anyway it would be much better than no search at all. As the Garmins list POIs next to your location/pointer streets with the same name in different locations wouldn't be a problem, would they? Still you will see streets wich are splitted into various trunks as multiple streets with the same name, but again it's much better than no search at all.

  • Yes thats a good idea, I've seen groups on the net doing that. Heh, I looked up OsmPoiCreator thinking it would be ideal but saw that you wrote it... so maybe thats not what you were looking for...
    • OsmPoiCreator creates custom POIs in gpx and gpi formats. My idea was to embed the streets as POIs in the map. Thus they could appear as a category of its own (like "Streets") in the find menu. If we place them in the gpi file you had to go to Find, Custom POIs, Press menu, select database, choose "Streets" and then search for the desired destination. Not as straightforward as having them directly in the find menu :) .

mkgmap-r530 support Chinese?

Hi,

Just found this cool tool, and I tried to use josm created a .osm file (POI in Chinese) and compileed with mkgmap-r530. And the final img file contain "???" for the POI name (in Chinese), I also tried to add --latin1, however still the same. Just wondering if mkgmap-r530 support Chinese or not? Or is there any way to do this?

Thanks

it is the same with russian language. Regards --Stefan 19:16, 26 February 2008 (UTC)

QLandkarte has support for 10bit encoding, so there is a free software reference code which can be implemented in mkgmap --Usm78 23:11, 24 March 2008 (UTC)

Buildings and TYP-Files

Computerteddy has included rendering buildings with building=yes tag in his World Map. This is very usefull for orientation. There are two problems with rendering.
1. The colour of the building, it is white. In Mapsource the background is yellow and the buildings are white, it is difficult to see a building on the map. It is possible to change this colour to a light red or so? The Garmin code for building is 0x13.
2. Using of multipolygon for building with a courtyard. Example is The Zwinger in Dresden. It is possible to render this in the same way like Osmarender do it?
Best Regards from Dresden --Stefan 19:29, 26 February 2008 (UTC)

0x13 is really "Man-Made Area" (shown as "Area" ("Fläche") on a nuvi). I guess, it's not supposed to be easily visible. Having a better code would be nicer. Another option is some "TYP"-file, which changes the colors for existing codes or so. But I have no idea, how they work. Elrond 12:25, 1 March 2008 (UTC)

Hello Elrond and Steve, I have used the last days to learn something about TYP-Files for Garmin. The Result you can find on my Page User:saftl, there are some Screenshots from Mapsource and my Nüvi. On the Etrex Vista HCX it is also working. I have created a TYP-File for Polylines and Polygones which are defined in Computerteddys Map Feature File. The Styles and Colors I have made in a similar way to Osmarender. So my Garmin Map is look like Informationfreeway.org now ;-).
If you want test the TYP-File by yourself, load the TDB-File and Typ-File from my site User:saftl, load Computerteddys World File and create a REG-File like on my site. Than you can see the new style of the map in Mapsource and you can downlod it to the handheld. In QLandkarte is no Typ-File working at the moment, so you must use Mapsource.
It would be a nice thing, if mkgmap can include a typ-file in the mapset, than we don't need cgpsmapper for this. It is not so difficult, only the Map ID from the TYP File must set also in the TDB File. I have used ID 42 for my Map.
Best Regards --Stefan 21:07, 17 March 2008 (UTC).

That is cool! Is it not possible to use mkgmap to add the typ-file into the gmapsupp.img file? It is meant to work. I can make it also take note of the family ID in the TDB/TYP files. ..Steve (AcousticNewt 00:09, 20 March 2008 (UTC))
I don't know, if mkgmap can include the Typfile into the gmapsupp.img. I'm more interested in including the Typfile into the Mapset for Mapsource. So it would be cool, if you can add an option to mkgmap "--typfile=file" or so, so that the typfile is added to the compiled mapset. To do this, mkgmap can read out the FamilyID from the Typfile which is specified and can include this into the TDB-file and the mapset is perfect for including in Mapsource. If you make a gmapsupp.img with mkgmap you can also add the typfile automatically to the gmapsupp.img. --Stefan 14:16, 20 March 2008 (UTC)
Are there any news for including Typfile Support in mkgmap? Did you need more information or anything else? --Stefan 16:28, 6 April 2008 (BST)

creating tdb-files

the option --tdbfile doesn't seem to work with custom names. The programm returns 63240000.img and 63240000.tdb files, while --tdbfile option is turned on, even when requested --mapname=12345678 which works for the img-name without tdbfile-option. The option use like --tdbfile=12345678 doesn't seem to work either. Dieterdreist 23:01, 29 April 2008 (UTC)

Hello, you need to use --overview-mapname=12345678 option, this makes both the overview mapname and the tdb name the same - as I believe they have to be. Thats probably worth me noting in the documentation as it is not obvious. The --tdbfile option does not take an argument. ..Steve (AcousticNewt 07:13, 30 April 2008 (UTC))

Hi, I investigated why Mapsource crash with German map from Computerteddy. It seems that parent map number for detailed maps is harcoded to 63240000. It should be equal to overview map number, so when you set overview map name to anything else then "63420000.img" then Mapsource will crash reading TDB. Just initialise value for parent with overview map number, it seems that you have "TODO parent =" comment in right place in TdbBuilder.java file :-) --Popej. 12:26, 21 June 2008 (UTC)

OK its time to do the TODO :) I've committed the fix, thanks. I didn't see the crash though, so I'd appreciate if you or someone who was having the problem can check that it works ..Steve (AcousticNewt 15:27, 21 June 2008 (UTC))

multiple tag parsing

It would be really cool to have multiple tag parsing. I propose that more than one OSM-tag could be used to determine the rendered feature. This would be useful to lots of things: different tracktypes, rendering of highway-areas (Squares, but also big traffic-zones, an extension at the end of a small road... ), which are tagged highway=xy, area=yes (right now, you have to decide which tag you are going to interpret: highway or area). It would also allow to use different icons for different restaurants (using the cuisine-tag as well) and the like. It can also be used for other areas besides highways, where the tagging convention recommends the use of area=yes property (Key:area) -- Dieterdreist 23:16, 29 April 2008 (UTC)

Yes it would be cool. The current re-write of the map-features system will allow for things like that, or that is the plan anyway. (AcousticNewt 07:19, 30 April 2008 (UTC))

Bug in rendering order?

I just used mkgmap 586 to create a gmasupp img from Computerteddy's tiles from April, 30th (created with mkgmap 586, as well) and I stumbled across a problem which can be seen in this area:

The lake on the left ("Adenauerweiher") and the long, narrow lake in the forest on the right both have the property natural=water, and both are in a forest area tagged with layer=-1. However, on my Legend Hcx, only the lake on the right is displayed correctly; the "Adenauerweiher" on the left can be seen briefly, however the forest area is rendered on top of it, in spite of the layer-property.

I could probably change the map data so that both lakes would show up on the Garmin, but from my understanding, this area should be displayed correctly the way it is, so it'd probably better to fix the underlying bug in mkgmap(?) than to cure this particular symptom.

Now I don't know anything about mkgmap's immer workings, so here's the small list of differences I could find between the two lakes. I hope that one of them is the culprit:

  1. The lake on the right hand side was added after the forest area was already there. (Forest ID: 7368706, lake ID: 23222611) However, on the left hand side, the lake was added before the forest. (Forest ID: 23976701, lake ID: 23897058)
  2. The lake on the left has a "name" attribute, the one on the right doesn't.
  3. The lake on the left is fully inside of the forest area, whereas the one on the right is only partially within that area.

My money would be on the first one being the problem, but like I said, I have no idea how mkgmap does its magic. :-)

Anyway, thanks for any help. If you need any further info, I'll be happy to provide it.

--Baumi 13:38, 2 May 2008 (UTC)


POI Bus_Stop and Motorway_Links

Hello,

is it possible to export the POI bus_stop with a name "Teststraße" as "Bus:Teststraße", because the Garmin Device shows all POI's in a list and a can not see, whether the name "Teststraße" is a bus_stop or another POI. If there is no name, the POI is called "Bushaltestelle", thats ok, "Bushaltestelle: Teststraße" would be optimal but is too long for the Garmin Device.

On the Etrex Vista there is a POI-Button Motorway-Links but the list is empty ...

I think your work is very very helpfull for the community, i use the maps from Computerteddy made with mkgmap. Thanks a lot for your work ...

-- huber08, 12 Juni 2008

Personal tools
recent changes