This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

No result if area do not contain nodes (osm.org/api/0.6/map)

0

I use http://api.openstreetmap.org/api/0.6/map?bbox=-118.28183448540011,34.02306804799843,-118.28091502587874,34.023833568382074 to ask for buildings or streets within the area that I provide. But I get nothing if my area do not contain Nodes coordinates which make of way(building or polygon). While, my area is within the way. How can I handle with it.

asked 01 Jul '13, 21:25

dong%20han6's gravatar image

dong han6
11112
accept rate: 0%

edited 02 Jul '13, 01:09

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


One Answer:

5

The map call on the main API searches for nodes within the bounding box only and not for intersecting way segments.

You can use Overpass API instead, for example via Overpass Turbo:

(way(34.02306804799843,-118.28183448540011,34.023833568382074,-118.28091502587874);>;);out meta;

This finds all ways that intersect the given bounding box. For more details, please read about some map call variants in the Overpass API documentation.

answered 02 Jul '13, 08:47

Roland%20Olbricht's gravatar image

Roland Olbricht
6.7k36489
accept rate: 36%

Source code available on GitHub .