I am interested in creating a CSV file of addresses from the the Milton Keynes area (in the format street name, town, postcode, city, latitude, longitude). This is what I've done so far: 1) Download osm files for the UK at http://nick.dev.openstreetmap.org/downloads/planet/ 2) Run osmfilter:
3) Run osmconvert:
My problems
How would I refactor my osmfilter and osmconvert commands to pull the necessary information for the Milton Keynes area? asked 24 Jul '14, 20:02 methuselah90 |
nominatim (the engine behind the search on the map on osm.org) builds hierarchies out of the OSM data and does not return results based on the unprocessed OSM data. For example if there is a house with just a number it will match that with the nearest road and so on, without doing such processing you will not get the same results. Back to your question: osmconvert supports clipping on a bounding box or a polygon, see the OSM wiki section on "Applying Geographical Borders". Using a bounding box is likely to be simplest for starters (you already have one displayed in the picture you supplied). answered 25 Jul '14, 07:56 SimonPoole ♦ SK53 ♦ |
According to the data model used at least in Germany, the information about a city or postalcode area to where a street belons is NOT stored on each street. For that purpose we have boundary relations, a group of boundary ways in a closed circle that describe an area. So you should have a look whether these relations are present in the OSM data for your purposes. About administrative borders, see openmapsurfer (choose grayscale layer with borders overlay) or wambacher's boundary display Then you have to adjust your osmfilter commands, and find a solution how to determine in which area you have each street. OR alternatively: when your area has almost complete addr: data, try keeping it with osmfilter answered 25 Jul '14, 15:33 stephan75 |