Hello, i have got a file osm form ..geofabric and i want to get from that file infomration like - street name , city name , housenumber and coordinates to csv file. to achive that i used osmconverter and almost everything is fine but , how can i know the name od columns used in osm file ? how can gat all columns from osm file ? i used a comand like this osmconvert and.osm --csv="@id @oname osm_id @o type @lon @lat @version @uid @user smoking designation addr:postcode addr:city a ddr:street addr:housenumber @" --csv-headline --out-csv -o="final.csv" asked 04 Oct '16, 12:05 marbo4 |
OSM data doesn't have a fixed number of attributes. If you need to get "all" tag information from a specific OSM extract in to a fixed format column format you will need to first do a pass over the file to determine all keys that are present, or simply write a small script that does this in one pass (which might be a bit painful for a large extract). answered 04 Oct '16, 12:40 SimonPoole ♦ Hm, hm Thnx for answer. But i don't know how can I Pass over the file ? which program ? QGIS ? I try to use Qgis with plugin QuickOSM but it's crashes every time . File are to large.
(13 Oct '16, 07:29)
marbo4
|
As Simon said, you need to know the structure before you can create a csv. I can imagine some sort of parser to do this, but that only makes sense if you often have this problem. What I would do myself is use the PBF download from Geofabrik, then convert to spatialite. This can then easily be queried in QGIS. Common tags already are their own column, less common tags are merged together in an "other tags" column. These can still be queried with some creativity, but you can also edit the config file behind the process to get the columns straight into your spatialite database. Here's a step by step:
answered 17 Oct '16, 10:01 joost schouppe |