Hi

My goal is to get a list of all possible colonies/neighborhoods for particular indian city along with their coordinates. I plan to fetch this data from openstreetmap (if its allowed) once, and then use it on my own site. Is there a way to fetch this data from OSM ?

I tried looking through the xapi documentation, but didn't understand whether OSM xapi can do what I want.

Thanks

Edit: I tried this command to import into a database, but its not working. Can someone tell me whats wrong? osmosis --read-xml file="NewDelhi.osm" --write-apidb host="localhost" dbType="mysql" database="os" user= "root"

asked 28 May '12, 06:58

goddamnit's gravatar image

goddamnit
1111
accept rate: 0%

edited 29 May '12, 14:30

Maybe I should try explaining my question again: All I want is the lat/long of the places in the marked circles:marked circles:

Please someone just give me a kick in the right direction please. Thanks

(29 May '12, 12:49) goddamnit

Taking an example of "Lajpat Nagar", which is one of those that you highlighted, I:

  1. Searched for it to find out that you were talking about New Delhi, then
  2. Viewed the map for that location
  3. Selected "browse map data" on the edit menu
  4. Clicked on the green dot associated with "Lajpat Nagar"
  5. Then clicked on details, which displays this

There we can see that it's a "place=suburb" (and we can see its coordinates). If you want to extract multiple suburbs from an area you can use one of the options on the XAPI page.

An XAPI query using Mapquest's instance would be something like this:

wget http://open.mapquestapi.com/xapi/api/0.6/*[place=suburb][bbox=77.1883,28.5743,77.2476,28.627]

That fetches back a .OSM XML file - if you open that in a text editor you can figure out what's what.

Similarly, we can see that the Asiad Games Sports Complex is a "leisure=sports_centre". This one's a little more complex because it's a closed way (an area) - you can click on each node to get a series of coordinates of the outside of it, and if you do an XAPI query you'll get the way and constituent nodes.

A quick way to figure out the coordinates you need for the XAPI is to click the "Export" tab on the OSM map and size the window to cover the area you want - then just copy the values from the export pane.

permanent link

answered 29 May '12, 16:49

SomeoneElse's gravatar image

SomeoneElse ♦
32.3k63335756
accept rate: 15%

Thanks so much for answering, I'll try this method asap!

(29 May '12, 17:38) goddamnit
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×240
×1

question asked: 28 May '12, 06:58

question was seen: 3,749 times

last updated: 29 May '12, 17:38

powered by OSQA