hello good morning,
what should i use:
PostGis as a solution for getting a database populated by osm2pgsql or osmconvert / -filter to create csv-sheets
aimed is to transform data out of German osm-pbf-files - in order to get the data (not to creat maps again)
see the source (s)= http://download.geofabrik.de/europe/germany.html ranging form 10 MB (Bremen) to 390 MB (Nordrhein Westfalen) the osm.pbf-files are not too big; Question: which method is the best - the most appropiate? - to store the results in a mysql-db or just have big calc-sheets (with csv-data)
- only straightforward from files that
- no backimport of data to OSM from a .csv file
i want to gather data from .o5m & pbf file - several ways are possible: what is wanted: i look for restaurants - with all of the following tags:
@id @lon @lat amenity name adress [as town, street, housnumber] website and mailadress.
All interests are based on the regions of Germany see http://download.geofabrik.de/europe/germany.html i have several files i want to work with - ranging form 10 MB (Bremen) to 390 MB (Nordrhein Westfalen) the osm.pbf-files are not too big;
so the main question: which method is the best and the most appropiate? - to store the results in a mysql-db or just have big calc-sheets (with csv-data)
Well what i want to accomplish can be done with osmfilter/osmconvert too. So i guess that for my OSM purposes it is easier to filter and manipulate data in simple CSV format … because there is no need to learn complex database queries.
For example:
$ ./osmfilter bremen.o5m --keep="addr:country= and addr:city= and addr:street=" --ignore-dependencies | ./osmconvert - --csv="@oname @id @lon @lat addr:country addr:city addr:street"
we can do alot with osmconvert and osmfilter. :: using osmconvert to csv file… eg: . see the many sites that i get when searching for csv …they show that we can do lots of things with osmconvert… and filter. dont they!?
but on the other handsite:
since i can do lots of things with overpass-api i wondder how good (and easy) i can transforme the data to the mysql-db.:
see the overpass-api request:
query type="node">
<has-kv k="place" v="city"/>
<has-kv k="name" v="any town "/>
</query>
<query type="node">
<around radius="1000"/>
<has-kv k="shop"/>
</query>
<print/>
and the outconme;
osm version="0.6" generator="Overpass API">
<note>
The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.
</note>
<meta osm_base="2013-03-07T14:54:02Z" areas="2013-03-07T10:37:02Z"/>
<node id="240486180" lat="50.9744274" lon="3.0152858">
<tag k="addr:housenumber" v="9"/>
<tag k="addr:street" v="Marktplaats"/>
<tag k="amenity" v="cafe"/>
<tag k="email" v="vandaelekoen67@skynet.be"/>
<tag k="name" v="Paviljoentje"/>
<tag k="opening_hours" v="Mo-Su 09:00+; Tu off; Th 09:00-14:00"/>
<tag k="phone" v="+3251636211"/>
<tag k="website" v="http://www.paviljoentjestaden.be"/>
</node>
<node id="244312208" lat="51.2461401" lon="5.4390455">
<tag k="amenity" v="cafe"/>
<tag k="created_by" v="JOSM"/>
<tag k="name" v="De Club"/>
</node>
so - well what would you say…
i think i can reach the most of my desired goals with osmconvert and -osmfilter. Especially if i focus on the the regional germany dataset.
Note; All interests are based on the regions of Germany see http://download.geofabrik.de/europe/germany.html i have several
files i want to work with - ranging form 10 MB (Bremen) to 390 MB (Nordrhein Westfalen) the osm.pbf-files are not too big;
what do you advice - !? i guess that i can go with osmconvert and -filter to get csv-files. Since the files that result out of the GERMAN regional db are not toooo big!? What do you say!?
look foward to hear from you