0

How to get list of addresses containing city name, street name, building number, latitude and longitude from Osm with osmosis to mysql. Thanks about Postgres tips. General question is about getting this list.

Test fetching request is not working:

osmosis --read-pbf planet-latest.osm.pbf --write-apidb dbType="mysql"
host="localhost" database="planet8" user="user" password="password"
validateSchemaVersion=no

it gives error like:

org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-pbf failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to insert user with id 485654 into the database.

I'm using sql dump from https://github.com/oschrenk/osmosis-mysql and it looks strange little bit. Not sure, that it is suitable for current needs.

Denis
  • 11
  • 3
  • Unrelated to your error: What is your ultimate goal? The raw OSM database doesn't contain a full [address](https://wiki.openstreetmap.org/wiki/Addresses) hierarchy for every house number. There are many nodes and ways with just a house number and street name. To obtain a full address hierarchy a geocoder has to be used, for example [Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim). So depending on your ultimate goal it might be a good idea to set up a Nominatim instance instead. – scai Sep 06 '16 at 10:37
  • Scai, this is for tooltiping users address of property they would like to sell or buy and for plotting this information on map. So with osmosis I'd like to get list of lat&long pairs for planet wich have human readable address to get ability for people search this points with words not with lat&long params. – Denis Sep 07 '16 at 06:36
  • So may be you would like to say it's impossible to get list of lat,long,number,street,city with osmosis app from pbf file? – Denis Sep 07 '16 at 06:42
  • Impossible is the wrong word. It is possible, but not for all addresses in OSM because only some of them contain a full address hierarchy while for others the address hierarchy has to be calculated with the help of a geocoder first. – scai Sep 07 '16 at 06:45
  • Scai, it's ok. I'd like to look and try. I don't mind about calculating – Denis Sep 07 '16 at 06:47

0 Answers0