Hello, Are there any methods to import osm data especially (properties) to excel sheet and vis versa? asked 25 Feb '13, 14:27 AddisMap Meti |
From OSM to Excel, I'd use osmconvert. Going the other way (once you've addressed all the usual "import" issues), try looking at the answers to this previous question. answered 25 Feb '13, 14:51 SomeoneElse ♦ Thank you for your help but steel am having problems with osmconvert I can't get the option to convert ether to Excel or csv file can you help me with the code or ....
(25 Feb '13, 17:41)
AddisMap Meti
1
As an example, here's the full process that I used to obtain all mapped railway stations in mainland GB with lat and long in a spreadsheet: 1) osmconvert great_britain.osm.pbf -o=great_britain.o5m 2) osmfilter great_britain.o5m --keep="railway=station" > stations.osm 3) osmconvert stations.osm --all-to-nodes --csv="@id @lat @lon railway name" --csv=headline > stations.txt 4) Open stations.txt in your spreadsheet program of choice, and remove lines that don't have "station" in column D Step (1) is needed because osmfilter doesn't understand pbf (protobuf format) files. You could process as a raw .osm file, but it'd be much bigger. Step (4) is a sanity check to get rid of a few bits and pieces.
(25 Feb '13, 17:46)
SomeoneElse ♦
@SomeoneElse step 3 should read --csv-headline and not --csv=headline, as far as i can see. Step 4 could also be achieved automatically with perl, e.g. with (untested):
(26 Feb '13, 07:09)
gormo
Thank you very much it works! I also use Moor.XmlToCsvConverter.exe and its very simple!
(28 Feb '13, 15:07)
AddisMap Meti
|