I have tried osmconvert to convert osm to .o5m and .pbf file it works fine but am having problem converting osm to .csv or excel file I used ./osmconvert addis.osm --all-to-nodes --csv="@id @lon @lat amenity cafe restaurant name" or ./osmconvert addis.osm --all-to-nodes --csv="@id @lon @lat amenity cafe name" but nothing comes up is there any other way to convert osm to excel sheet or csv file? asked 25 Feb '13, 18:01 AddisMap Meti |
OSMconvert is not a filter. This means that all features will be converted. To achieve your goal of having only certain features in your csv file, you will have to filter the csv file generated by osmconvert afterwards. Also, the arguments to the --csv option of osmconvert are the tag keys you want to have in your csv file. If you want "amenity" and "name" columns in addition to id, lat and lon, you specify "@id @lon @lat amenity name", and then filter the CSV output. For example:
answered 25 Feb '13, 19:37 gormo how to store that in mysql
(20 May '14, 12:16)
say_hello_to...
Have you ever tried any internet search engines like duckduckgo, google, yahoo or similar, and do a search there for "import csv in mysql" or similar?????
(21 May '14, 18:18)
stephan75
1
@stephan75 : apparently he has not bothered. So he might find some hints for the problem he faces at http://stackoverflow.com/questions/3635166/how-to-import-csv-file-to-mysql-table . At least be helpful, too.
(21 May '14, 20:01)
gormo
|
I have tried do a similar thing: convert a way in baikal.osm to baikal.csv . The problem is the order of nodes I get in .csv file. I used osmconvert baikal.osm --all-to-nodes --csv="@lon @lat" > baikal.csv I get nodes in wrong order. osmconvert do not read the second part of .osm file with <nd ref= ... How to solve this? answered 28 May '14, 20:29 miko679 |
You can also have closer look at the Java based tool OsmPoisPbf, which scans an OpenStreetMap file for nodes and areas (and relations) whose tags indicate them as POIs (points of interest) and extracts those into a comma separated file (CSV). answered 17 Dec '15, 20:38 stephan75 |
you forgot --out-csv and --o=...
also, see my answer