Hi, I'm using the windows version of osmfilter to try and extract city and town names with lat and long. The idea being to build a gazeteer for use in memory map. The command i use is osmfilter spain.o5m --keep-tags="city" --keep-tags="town"-o=mycity.osm The program runs, seems to be working but then keeps returning osmfilter error : write error I've searched using google and one other person has asked about this error but no answer was given. asked 05 Jan '14, 12:45 daveasbury Frederik Ramm ♦ |
You have misunderstood the The write error is likely a consequence of this misunderstanding; your command results in a file of about 9 GB and it is possible that you are either out of disk space, or even using a file system that cannot handle files that large. What you want is:
answered 05 Jan '14, 13:28 Frederik Ramm ♦ Thanks for the reply. I've sorted the write error. You are correct about the filtering. So is it possible to filter in the form - copy one town and cities? I've tried various examples but none seem to do what i'm after
(05 Jan '14, 14:37)
daveasbury
1
so you want to limit your result to a smaller area? If yes, can you define that area via a boundingbox or a boundary relation from the OSM data? like http://www.openstreetmap.org/relation/2417889 ?
(06 Jan '14, 16:26)
stephan75
Nope. What I am attempting is to take the file spain-latest.osm.pbf which i obtained, and extract all the towns and cities contained within it as well as their lat and long. This data would be ouput to a csv file in the form ExampleBarcelona 28.00023 3.34568 benidorm 28.00034 3.90987 this I would hope to import into the program memory map navigator to create a town look up gazeteer.
(06 Jan '14, 19:52)
daveasbury
The command in the grey box at the end of my original reply does just that (it doesn't give you a CSV but an OSM file with only towns and cities).
(07 Jan '14, 09:48)
Frederik Ramm ♦
2
... and then use http://wiki.openstreetmap.org/wiki/Osmconvert to convert your OSM file to a CSV file where you determine yourself what elements should be in the output file. Read that documentation in the OSM wiki and try several tags.
(07 Jan '14, 16:51)
stephan75
2
Thanks folks! finally sorted thanks to your replies using osmfilter spain.o5m --keep-nodes="place=city =town =village =hamlet =suburb =province" --keep-ways= --keep-relations= >mycity.osm and osmconvert mycity.osm --csv="name place province @lat @lon" -o=somefilename.csv this i imported into memorymap to work with my Mobac maps and it works!
(07 Jan '14, 19:58)
daveasbury
showing 5 of 6
show 1 more comments
|