converting post codes to cities

It would appear that no one knows how to get a Nuvi to search for post codes so plan B is to convert all post codes to cities so that city search will find them not very elegant but if it works it will do. I have tried mkgmap:postal_code = * {set mkgmap:city = mkgmap:postal_code} but this does not seem to work, any suggestions? Barry -- View this message in context: http://gis.19327.n5.nabble.com/converting-post-codes-to-cities-tp5776958.htm... Sent from the Mkgmap Development mailing list archive at Nabble.com.

At present, searches seem to be confined to the osm place tag and there is no place=postal_code. You could isolate the osm postal code tags and add ,where necessary, a place tag and change the name to a postcode , then resave your osm and parse.You might need to write your own routine as Notepad+ chokes on large text files. It should work. ie <tag k="name" v="your postcode"/> <tag k="place" v="locality"/> -- View this message in context: http://gis.19327.n5.nabble.com/converting-post-codes-to-cities-tp5776958p577... Sent from the Mkgmap Development mailing list archive at Nabble.com.

I have created osm files using sed to rearrange the code point open csv files to lat long postcode format (as shown in a post in google groups) and then used gpsbabel to create an osm file I have entries like this <tag k="name" v="your postcode"/> <tag k="post_code" v="your postcode"/> so I can find and replace "post_code" with "place" to get <tag k="name" v="your postcode"/> <tag k="place" v="your post code"/> quite easily I am using notepad2 which is not the same as notepad+ it is the only program I have found which will cope with the 160000 + lines in the csv file I have split this into 3 files of about 60000 lines a-g h-r s-z if anyone would like a copy please let me know. I will post when I have tried the above out. -- View this message in context: http://gis.19327.n5.nabble.com/converting-post-codes-to-cities-tp5776958p577... Sent from the Mkgmap Development mailing list archive at Nabble.com.

<tag k="place" v="your post code"/> won't work <tag k="place" v="town"/> should work -- View this message in context: http://gis.19327.n5.nabble.com/converting-post-codes-to-cities-tp5776958p577... Sent from the Mkgmap Development mailing list archive at Nabble.com.

I don't understand, here is a snippet of my osm file <?xml version='1.0' encoding='UTF-8'?> <osm version='0.5' generator='GPSBabel-1.4.4'> <node id='-1' visible='true' lat='57.1482319' lon='-2.0966479'> <tag k='created_by' v='GPSBabel-1.4.4'/> <tag k='name' v='AB10 1AA'/> <tag k='place' v='AB10 1AA'/> </node> <node id='-2' visible='true' lat='57.1487071' lon='-2.0978060'> <tag k='created_by' v='GPSBabel-1.4.4'/> <tag k='name' v='AB10 1AF'/> <tag k='place' v='AB10 1AF'/> </node> could the node id also be a problem, if it is do you know of an automatic my to change them. Barry -- View this message in context: http://gis.19327.n5.nabble.com/converting-post-codes-to-cities-tp5776958p577... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Barry, the reason why it doesn’t work is that you use <tag k='place' v='AB10 1AA'/> you must use a valid ‘place’ tag ,ie <?xml version='1.0' encoding='UTF-8'?> <osm version='0.5' generator='GPSBabel-1.4.4'> <node id='-1' visible='true' lat='57.1482319' lon='-2.0966479'> <tag k='created_by' v='GPSBabel-1.4.4'/> <tag k='name' v='AB10 1AA'/> <tag k='place' v=’locality'/> </node> <node id='-2' visible='true' lat='57.1487071' lon='-2.0978060'> <tag k='created_by' v='GPSBabel-1.4.4'/> <tag k='name' v='AB10 1AF'/> <tag k='place' v='locality'/> </node> From: gbbickerton [via GIS] Sent: Wednesday, September 11, 2013 8:30 AM To: nwillink Subject: Re: converting post codes to cities I don't understand, here is a snippet of my osm file <?xml version='1.0' encoding='UTF-8'?> <osm version='0.5' generator='GPSBabel-1.4.4'> <node id='-1' visible='true' lat='57.1482319' lon='-2.0966479'> <tag k='created_by' v='GPSBabel-1.4.4'/> <tag k='name' v='AB10 1AA'/> <tag k='place' v='AB10 1AA'/> </node> <node id='-2' visible='true' lat='57.1487071' lon='-2.0978060'> <tag k='created_by' v='GPSBabel-1.4.4'/> <tag k='name' v='AB10 1AF'/> <tag k='place' v='AB10 1AF'/> </node> could the node id also be a problem, if it is do you know of an automatic my to change them. Barry -------------------------------------------------------------------------------- If you reply to this email, your message will be added to the discussion below: http://gis.19327.n5.nabble.com/converting-post-codes-to-cities-tp5776958p577... To unsubscribe from converting post codes to cities, click here. NAML No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.3392 / Virus Database: 3222/6654 - Release Date: 09/10/13 -- View this message in context: http://gis.19327.n5.nabble.com/converting-post-codes-to-cities-tp5776958p577... Sent from the Mkgmap Development mailing list archive at Nabble.com.

I have tried mkgmap:postal_code = * {set mkgmap:city = mkgmap:postal_code} but this does not seem to work, any suggestions?
Can you please tell what does not work? When using the following rules: include 'inc/address' mkgmap:postal_code = * {set mkgmap:city = mkgmap:postal_code} the *address search* uses the postal code instead of the city name. So you can search for the address Country: Germany Streetname: Unter den Linden City: 10117 If you want to use postal codes in the city search you have to add places POIs. So you might use the --add-pois-to-areas option and add the following rule as first rule in the points file: postal_code=* & mkgmap:area2poi=true { add place=city; set name=${postal_code}; delete postal_code } WanMil

I have tried using mkgmap:postal_code=* & mkgmap:area2poi=true { add place=city; set name=$(addr:postcode); delete addr:postcode } but I am getting a lot of "point number to big" error messages and map compilation fails, is there a limit to the number of poi in a map ? I also have <tag k='place' v=’locality'/> in the osm file so maybe every post code is used twice, I think there are about 1600000 of them. My post codes are 7 digit eg ( NE46 3JB) which I think is the addr:postcode tag and that postal_code is for an area post code eg (NE46) so I probably don't need the & mkgmap:area2poi=true test. Using just <tag k='place' v=’locality'/> does not create a map that a Nuvi 200 can find post codes in but I have not tried other gps's or basecamp yet. -- View this message in context: http://gis.19327.n5.nabble.com/converting-post-codes-to-cities-tp5776958p577... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Postal Code Filters only seem to apply to NT imgs not the ones created using mkgmap. -- View this message in context: http://gis.19327.n5.nabble.com/converting-post-codes-to-cities-tp5776958p577... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Using mkgmap:postal_code=* & mkgmap:area2poi=true { add place=city; set name=$(addr:postcode); delete addr:postcode } does not seem to create cities with a name "postcode" I have tried this in basecamp and nuvi. However if I create a normal map and set the draw order to 31 and not transparent and then enable both city navigator and the osm map my nuvi will search for post codes in the city navigator map but display the osm map, also routing takes place using the osm map ( I have checked this against a newly built road) . -- View this message in context: http://gis.19327.n5.nabble.com/converting-post-codes-to-cities-tp5776958p577... Sent from the Mkgmap Development mailing list archive at Nabble.com.
participants (3)
-
gbbickerton
-
nwillink
-
WanMil