Hi

I am trying to find a way to automatically export the (lat, long) of the nodes associated with the perimeter of a given building without using the UI, completely through API. The ideal solution would be given an address of a building (way with tag building in OSM terms) to fetch the (lat, long)s of the associated nodes in an XML or plain text file.

Any insights? Kris

asked 09 May, 14:11

hectorlavoe's gravatar image

hectorlavoe
212
accept rate: 0%


The standard API call

http://api.openstreetmap.org/api/0.6/way/put_way_id_here/full

returns an XML containing the way and all its nodes, though the order of the nodes in the response might be different from the order in which they have to be traversed to form the line (i.e. you will have to traverse them in the right order as given in the way object).

permanent link

answered 09 May, 14:48

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
65.1k776011009
accept rate: 24%

Thanks Frederik! That seems to be really helpful! However, the link gives me a 404 error. Could you please re-post?

Many thanks, Kris

(14 May, 15:03) hectorlavoe

You need to replace put_way_id_here with the way ID of your building.

(14 May, 15:05) scai ♦

Great, that's super neat! Thank you.

(30 May, 10:16) hectorlavoe
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:

×220
×186
×134
×3
×2

question asked: 09 May, 14:11

question was seen: 185 times

last updated: 30 May, 10:16

powered by OSQA