Problems searching for California addresses

I've been using mkgmap to compile a California map for my Garmin for a while now, and was excited to see that addressing was being supported, but I'm having troubles getting this new feature to work as I expect. System Information: OS: 64-bit Ubuntu 11.10 GPS: Garmin Montana 650 software version 3.80 These are the steps I have taken: 1) Download california.osm.bz2 from cloudmade.com last updated 13 December 2011 http://downloads.cloudmade.com/americas/northern_america/united_states/calif... 2) Use osmconvert version 0.5Z to convert to pbf bzcat california.osm.bz2 | ./osmconvert32 - -o=california.pbf 3) Use osmconvert version 0.5Z to convert to o5m ./osmconvert32 california.pbf -o=california.o5m 4) Use splitter version r200 to create tiled osm.pbf files java -Xmx2000m -jar splitter.jar --mapid=63240001 california.pbf 5) Use osmfilter version 1.2M to create california-boundaries.osm ./osmfilter32 california.o5m --keep-nodes= --keep-ways-relations="boundary=administrative =postal_code postal_code=" > california-boundaries.osm 6) Use mkgmap version r2227 to create bounds directory java -Xmx2500M -jar mkgmap.jar --createboundsfile=california-boundaries.osm I get the following printouts, but I don't believe them to be critical: SEVERE (BoundarySaver): Calculate bbox to (32.18650817871094,-124.45449829101562) to (41.84246063232422,-114.79854583740234) SEVERE (BoundarySaver): Calculate bbox to (32.18650817871094,-124.45449829101562) to (41.84246063232422,-114.79854583740234) 7) Use mkgmap version r2227 to create gmapsupp.img file from the tiles and bounds directory java -Xmx2500m -jar mkgmap.jar --route --remove-short-arcs --add-pois-to-areas --index --gmapsupp *.osm.pbf This creates a valid Garmin map image that loads and displays map information on the device as expected, however I notice the following when trying to search for addresses on the Garmin Montana: 1) The only Country I can select is "Country", not USA or United States of America 2) City names hit and miss. "San Francisco" shows up as "San Francisco, ABC" but "Sacramento" isn't found. 3) Some addresses have incorrect city information, for example address that should be in "Fremont, Alameda County" are showing up under "Livermore, ABC". 4) Only some County names are showing up. "Ontario, Riverside Country" others like "San Francisco" show up as ABC. Any ideas on where these problems are occurring? I can search on openstreetmap.org and it appears to have the correct information as far as city, county and country, but I beyond that I haven't figured out how to verify when and where the data is correct or not. Thanks, Bill

Hello Bill, some of the problems are caused by the fact that you use the california.o5m to create the bounds for california. This extract probably doesn't contain any usable information about admin_level=2 boundaries like "USA". You should either use a larger extract (e.g. north america) to create the bounds or download the precompiled boundaries created by WanMil: http://www.navmaps.eu/wanmil/ Please try that first. Gerd Bill wrote
I've been using mkgmap to compile a California map for my Garmin for a while now, and was excited to see that addressing was being supported, but I'm having troubles getting this new feature to work as I expect.
System Information: OS: 64-bit Ubuntu 11.10 GPS: Garmin Montana 650 software version 3.80
These are the steps I have taken: 1) Download california.osm.bz2 from cloudmade.com last updated 13 December 2011 http://downloads.cloudmade.com/americas/northern_america/united_states/calif...
2) Use osmconvert version 0.5Z to convert to pbf bzcat california.osm.bz2 | ./osmconvert32 - -o=california.pbf
3) Use osmconvert version 0.5Z to convert to o5m ./osmconvert32 california.pbf -o=california.o5m
4) Use splitter version r200 to create tiled osm.pbf files java -Xmx2000m -jar splitter.jar --mapid=63240001 california.pbf
5) Use osmfilter version 1.2M to create california-boundaries.osm ./osmfilter32 california.o5m --keep-nodes= --keep-ways-relations="boundary=administrative =postal_code postal_code=" > california-boundaries.osm
6) Use mkgmap version r2227 to create bounds directory java -Xmx2500M -jar mkgmap.jar --createboundsfile=california-boundaries.osm
I get the following printouts, but I don't believe them to be critical: SEVERE (BoundarySaver): Calculate bbox to (32.18650817871094,-124.45449829101562) to (41.84246063232422,-114.79854583740234) SEVERE (BoundarySaver): Calculate bbox to (32.18650817871094,-124.45449829101562) to (41.84246063232422,-114.79854583740234)
7) Use mkgmap version r2227 to create gmapsupp.img file from the tiles and bounds directory java -Xmx2500m -jar mkgmap.jar --route --remove-short-arcs --add-pois-to-areas --index --gmapsupp *.osm.pbf
This creates a valid Garmin map image that loads and displays map information on the device as expected, however I notice the following when trying to search for addresses on the Garmin Montana: 1) The only Country I can select is "Country", not USA or United States of America 2) City names hit and miss. "San Francisco" shows up as "San Francisco, ABC" but "Sacramento" isn't found. 3) Some addresses have incorrect city information, for example address that should be in "Fremont, Alameda County" are showing up under "Livermore, ABC". 4) Only some County names are showing up. "Ontario, Riverside Country" others like "San Francisco" show up as ABC.
Any ideas on where these problems are occurring? I can search on openstreetmap.org and it appears to have the correct information as far as city, county and country, but I beyond that I haven't figured out how to verify when and where the data is correct or not.
Thanks, Bill
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@.org http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- View this message in context: http://gis.19327.n5.nabble.com/Problems-searching-for-California-addresses-t... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Gerd, Thanks for the quick reply. That makes complete sense that a California extract wouldn't have information about a larger area that it is part of. I'm not sure why it resolved having ABC instead of actual county information, but it seems to have done that as well. I've replaced steps 3, 5 and 6 with downloading and extracting bounds information: http://www.navmaps.eu/wanmil/world_20120221.zip That seems to resolve issue 1) and 4). It now shows United States of America and all the cities I've seen have a reasonable county listed. Which leaves: 2) some cities not showing up. Examples Oakland (Major California City) and Fremont (Where I live) 3) some addresses associated with an incorrect city. Example Fremont addresses are associated with Livermore. Further Information: Of all the cities in Alameda County, only Livermore seems to be present. [Alameda, Albany, Berkeley,Dublin,Emeryville,Fremont,Irvington,Hayward,Newark,Oakland,Piedmont,Pleasanton,San Leandro,Union City] I was hoping that everything in Alameda County was now in Livermore, but locations in Oakland are in San Francisco. And locations in Albany are in Richmond. I've been able to find all of the Cities in Alameda except for Fremont and Irvington in this file: bounds_1750000_-5700000.bnd Since it is a binary file, I'm not quite sure what it says about them. Also it would appear that in Contra Costa County at least 2 cities Concord and Martinez are present, many others in Contra Costa are missing. Thanks, Bill On 03/02/2012 09:51 PM, GerdP wrote:
Hello Bill,
some of the problems are caused by the fact that you use the california.o5m to create the bounds for california. This extract probably doesn't contain any usable information about admin_level=2 boundaries like "USA". You should either use a larger extract (e.g. north america) to create the bounds or download the precompiled boundaries created by WanMil:
Please try that first.
Gerd
Bill wrote
I've been using mkgmap to compile a California map for my Garmin for a while now, and was excited to see that addressing was being supported, but I'm having troubles getting this new feature to work as I expect.
System Information: OS: 64-bit Ubuntu 11.10 GPS: Garmin Montana 650 software version 3.80
These are the steps I have taken: 1) Download california.osm.bz2 from cloudmade.com last updated 13 December 2011 http://downloads.cloudmade.com/americas/northern_america/united_states/calif...
2) Use osmconvert version 0.5Z to convert to pbf bzcat california.osm.bz2 | ./osmconvert32 - -o=california.pbf
3) Use osmconvert version 0.5Z to convert to o5m ./osmconvert32 california.pbf -o=california.o5m
4) Use splitter version r200 to create tiled osm.pbf files java -Xmx2000m -jar splitter.jar --mapid=63240001 california.pbf
5) Use osmfilter version 1.2M to create california-boundaries.osm ./osmfilter32 california.o5m --keep-nodes= --keep-ways-relations="boundary=administrative =postal_code postal_code="> california-boundaries.osm
6) Use mkgmap version r2227 to create bounds directory java -Xmx2500M -jar mkgmap.jar --createboundsfile=california-boundaries.osm
I get the following printouts, but I don't believe them to be critical: SEVERE (BoundarySaver): Calculate bbox to (32.18650817871094,-124.45449829101562) to (41.84246063232422,-114.79854583740234) SEVERE (BoundarySaver): Calculate bbox to (32.18650817871094,-124.45449829101562) to (41.84246063232422,-114.79854583740234)
7) Use mkgmap version r2227 to create gmapsupp.img file from the tiles and bounds directory java -Xmx2500m -jar mkgmap.jar --route --remove-short-arcs --add-pois-to-areas --index --gmapsupp *.osm.pbf
This creates a valid Garmin map image that loads and displays map information on the device as expected, however I notice the following when trying to search for addresses on the Garmin Montana: 1) The only Country I can select is "Country", not USA or United States of America 2) City names hit and miss. "San Francisco" shows up as "San Francisco, ABC" but "Sacramento" isn't found. 3) Some addresses have incorrect city information, for example address that should be in "Fremont, Alameda County" are showing up under "Livermore, ABC". 4) Only some County names are showing up. "Ontario, Riverside Country" others like "San Francisco" show up as ABC.
Any ideas on where these problems are occurring? I can search on openstreetmap.org and it appears to have the correct information as far as city, county and country, but I beyond that I haven't figured out how to verify when and where the data is correct or not.
Thanks, Bill

Hi, I think you should have something like this in your mkgmap-call: --location-autofill=bounds,is_in,nearest --index --bounds=data\bounds Henning

Henning, I appreciate the info on additional options for location-autofill. Adding "--location-autofill=bounds,is_in" to my command I discovered that it will now pull city type information from the .osm file as well as from the bounds directory. Unfortunately there are a crazy amount of "hamlets" that are part of the OSM database and are not generally referred to as the city in an address. I found a smaller extract of the sf-bay-area (http://metro.teczno.com/#sf-bay-area) which includes Fremont which I am most interested in, and manually deleted every node, way and relation that was a hamlet. When I reprocess this and load it into my device, it passes all my quick spot checks that have failed before. I started looking at the default style rules to try and figure out if I could see how to disable hamlets, but all I see are admin_level* rules and there is no admin_level explicitly set on the hamlets. Is there a place I can look to find this mapping or does "is_in" add city information via another mechanism? Are the style rules the correct way to attack this, or should I be looking at pre-filtering the osm file using osmconvert or osmosis? It would seem that if new style rules could be devised then everyone else who tries to do this will get the automatic gain. Filtering would seem to just make it work for me. Thanks, Bill On 03/03/2012 12:13 AM, Henning wrote:
Hi, I think you should have something like this in your mkgmap-call:
--location-autofill=bounds,is_in,nearest --index --bounds=data\bounds
Henning

El 04/03/12 08:27, Bill escribió:
Henning, I appreciate the info on additional options for location-autofill.
Adding "--location-autofill=bounds,is_in" to my command I discovered that it will now pull city type information from the .osm file as well as from the bounds directory. Unfortunately there are a crazy amount of "hamlets" that are part of the OSM database and are not generally referred to as the city in an address.
I found a smaller extract of the sf-bay-area (http://metro.teczno.com/#sf-bay-area) which includes Fremont which I am most interested in, and manually deleted every node, way and relation that was a hamlet. When I reprocess this and load it into my device, it passes all my quick spot checks that have failed before.
I started looking at the default style rules to try and figure out if I could see how to disable hamlets, but all I see are admin_level* rules and there is no admin_level explicitly set on the hamlets. Is there a place I can look to find this mapping or does "is_in" add city information via another mechanism?
Are the style rules the correct way to attack this, or should I be looking at pre-filtering the osm file using osmconvert or osmosis? It would seem that if new style rules could be devised then everyone else who tries to do this will get the automatic gain. Filtering would seem to just make it work for me.
If you don't want to have hamlets in your map, you can simply remove or comment the line "place=hamlet [0x0b00 resolution 24]" in your points style file. If you want to keep hamlets, but don't have them in the cities index, you can change the type 0x0b00 to a different one not searchable.
On 03/03/2012 12:13 AM, Henning wrote:
Hi, I think you should have something like this in your mkgmap-call:
--location-autofill=bounds,is_in,nearest --index --bounds=data\bounds
Henning

Great I will try that, I wasn't sure that would affect addressing. Unfortunately I am having trouble with using the included example/styles/default in r2227 with no modifications. I copied the entire contents of examples/styles/default to stylesdefault and added --style-file=defaultstyle to my command and get a StackOverflowError java -Xmx2500m -jar mkgmap.jar --route --remove-short-arcs --add-pois-to-areas --location-autofill=bounds,is_in --index --gmapsupp --style-file=defaultstyle *.osm.pbf java.lang.StackOverflowError at java.io.UnixFileSystem.getBooleanAttributes0(Native Method) at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:243) at java.io.File.isDirectory(File.java:771) at uk.me.parabola.mkgmap.osmstyle.StyleFileLoader.createStyleLoader(StyleFileLoader.java:55) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.<init>(StyleImpl.java:132) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.readBaseStyle(StyleImpl.java:518) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.<init>(StyleImpl.java:140) ...(Previous 2 lines repeated many times) Exiting - if you want to carry on regardless, use the --keep-going option Thanks, Bill On 03/04/2012 12:18 AM, Carlos Dávila wrote:
If you don't want to have hamlets in your map, you can simply remove or comment the line "place=hamlet [0x0b00 resolution 24]" in your points style file. If you want to keep hamlets, but don't have them in the cities index, you can change the type 0x0b00 to a different one not searchable.

Thanks to everyone for your help. Here is what I have found with styles: 1) the "info" file included with the default style is what is causing the StackOverflowError. More specifically the "base-style=" lines. I am not sure from the documentation that I have found what these should be. 2) the included default style is different from the example default style. I verified that the example default style was identical to the default style that is part of the jar file. I can tell they are different because the .img files that are created are very different in size. I have no idea what the differences actually are. 47588352 bytes for --style=default 38774784 bytes for --style-file=examples/styles/default I tried adding the map-features.csv that is part of the jar to the example default style which got the size closer 43748352 bytes for --style-file=examples/styles/default w/ map-features.csv Again I have no idea what this has added, and or what difference still exist between it and the default style. 3) Ignoring the file size difference. The examples/styles/default appears to function the same with regards to addresses as the default. I was able to comment out the hamlet style and it seems to have had the same effect as manually deleting all the hamlets. Here are the steps that seem to result in a reasonable California map with address search capability: 1) Download california.osm.bz2 from cloudmade.com last updated 13 December 2011 http://downloads.cloudmade.com/americas/northern_america/united_states/calif... 2) Download and unzip boundary file world_*.zip from http://www.navmaps.eu/wanmil/ (should automatically end up in a directory "bounds") 3) Use splitter version r200 to create tiled osm.pbf files java -Xmx2000m -jar splitter.jar --mapid=63240001 california.osm.bz2 4) Edit examples/styles/default/points to remove hamlets comment the line "place=hamlet [0x0b00 resolution 24]" in your points style file 5) Create Map java -Xmx2500m -jar mkgmap.jar --route --remove-short-arcs --location-autofill=bounds,is_in --style-file=examples/styles/default --index --gmapsupp *.osm.pbf I'm sure this isn't a perfect solution, but it give vastly superior results to either just using bounds (too few cities), or using is_in with hamlet information (too many "cities") for California. Thanks again, Bill

Summary: Don't trust cloudmade extracts. Hopefully one last post on this matter. After more investigation of other matters, it looks like my problem was really in my first step. Cloudmade uses very aggressive clipping polygons when they do the extract. They are so aggressive they remove bridges and features that are close to the coastline. Turns out most of Alameda County has coast-line and the admin_bounds regions get clipped. Here is a better source that I found: 1) Download california.osm.pbf from geofabrik.de http://download.geofabrik.de/osm/north-america/us/california.osm.pbf Using that I can now locally extract the bounds using the steps I initially posed (dropping the conversion to pbf). It lists "United States" instead of "United States of America" for the country, but that seems reasonable. Adding "--location-autofill=bounds,is_in" and using a modified the style without hamlets are both still necessary. Thanks again, Bill On 03/04/2012 09:57 PM, Bill wrote:
Thanks to everyone for your help.
Here is what I have found with styles: 1) the "info" file included with the default style is what is causing the StackOverflowError. More specifically the "base-style=" lines. I am not sure from the documentation that I have found what these should be.
2) the included default style is different from the example default style. I verified that the example default style was identical to the default style that is part of the jar file. I can tell they are different because the .img files that are created are very different in size. I have no idea what the differences actually are. 47588352 bytes for --style=default 38774784 bytes for --style-file=examples/styles/default I tried adding the map-features.csv that is part of the jar to the example default style which got the size closer 43748352 bytes for --style-file=examples/styles/default w/ map-features.csv Again I have no idea what this has added, and or what difference still exist between it and the default style.
3) Ignoring the file size difference. The examples/styles/default appears to function the same with regards to addresses as the default. I was able to comment out the hamlet style and it seems to have had the same effect as manually deleting all the hamlets.
Here are the steps that seem to result in a reasonable California map with address search capability:
1) Download california.osm.bz2 from cloudmade.com last updated 13 December 2011 http://downloads.cloudmade.com/americas/northern_america/united_states/calif...
2) Download and unzip boundary file world_*.zip from http://www.navmaps.eu/wanmil/ (should automatically end up in a directory "bounds")
3) Use splitter version r200 to create tiled osm.pbf files java -Xmx2000m -jar splitter.jar --mapid=63240001 california.osm.bz2
4) Edit examples/styles/default/points to remove hamlets comment the line "place=hamlet [0x0b00 resolution 24]" in your points style file
5) Create Map java -Xmx2500m -jar mkgmap.jar --route --remove-short-arcs --location-autofill=bounds,is_in --style-file=examples/styles/default --index --gmapsupp *.osm.pbf
I'm sure this isn't a perfect solution, but it give vastly superior results to either just using bounds (too few cities), or using is_in with hamlet information (too many "cities") for California.
Thanks again, Bill
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On Sun, Mar 04, 2012 at 10:17:16AM -0800, Bill wrote:
I copied the entire contents of examples/styles/default to stylesdefault and added --style-file=defaultstyle to my command and get a StackOverflowError
Should it be --style-file=stylesdefault, to match the directory name that you mentioned? Marko
participants (5)
-
Bill
-
Carlos Dávila
-
GerdP
-
Henning Scholland
-
Marko Mäkelä