Hello, I would like to have lat, lon and adress for every adress in germany. The problem with my codesnippet is, that it seems that I get every street as a result, but with large gaps between housenumbers. When I visit osm in my browser, I can see housenumbers on the map which are surprisingly not contained in my csv. But I want all adresses with coordinates, and when I can see adresses in the browser, I know its possible to extract the whole set into a csv. file. This is my code snippet: osmfilter deutschland.osm --keep="addr:country= and addr:city= and addr:postcode= and addr:street= addr:housenumber=" --ignore-dependencies | osmconvert - --csv="@oname @id @lon @lat addr:country addr:city addr:postcode addr:street addr:housenumber" -o=deutschland.csv I want complete adresses, or to be more precise: lat, lon, city, street, housenumber. For every housenumber in germany. Thank you for your professional help. Greetz asked 07 Mar '16, 13:10 Stephano007 |
It would seem as if osmconvert is doing exactly what you asked it to, just not what you actually wanted. There are a number of obvious misconceptions present in the arguments
As you can see there is some work and heuristics involved in producing a complete addess hierarchy from OSM data. It could be very well be that a local nominatim installation containing the data for Germany would be an easier and better solution than trying to build it yourself. answered 07 Mar '16, 14:04 SimonPoole ♦ Thank your for your answer. Ok, I see the point, looks like a lot of programming. Work, that already seemed to be done by nominatim. When I have a database, with lets say 100.000 adresses, could Nominatim api provide me with the fitting lat / lon? Automatically, so I dont have to do it manually for every adress? Can Nominatim also write back to DB? Thank you for your expertise, Greetz, Stephano
(07 Mar '16, 14:47)
Stephano007
Hello SimonPoole, you seem to have a good kind of overview, please answer my questions ^^). I have certain adresses, can I enrich for example 1000 of those adresses with lat/lon by using a local nominatim installation? Is it possible to automatize this process? So could I connect nominatim to my db or generate a .csv file with it? Because I would like to give adress as input, and get lat/lon as result.
(07 Mar '16, 18:08)
Stephano007
Yes, this is possible. Nominatim has a simple HTTP API which you can use for geocoding your addresses.
(07 Mar '16, 18:34)
scai ♦
|
You should also pay attention that there are at least two other options to tag a complete address, at least in Germany: addr:housenumber=* AND addr:place=xxxx ... for villages and hamlets which are so small that there are no extra street names, and OSM relations of type=associatedStreet ... see Relation:associatedStreet in the OSM wiki. If you are able to read in German, also have a look at this article. answered 07 Mar '16, 16:56 stephan75 |