Why not ask your question on the new OpenStreetMap Community Forum?

I'm trying to retrieve the forests within a specific (relatively small) bounding box with Overpass API. I'm using the following query:

out body;
out skel qt;

When the edge of the forest intersects my bounding box, the query works as intended:

alt text

But once the bounding box is completely inside of the forest, I receive no results:

alt text

Is there any way to fix this?

asked 27 Nov '18, 09:15

misotrnka's gravatar image

accept rate: 0%

It's not a 100% answer, but for forests with names, you can retrieve them using is_in:

is_in(48.21634,17.12552) ->.in;
out geom;

the is_in operator returns Overpass-API areas, the pivot statements retrieve the underlying geometries related to those features. You can look in https://github.com/drolbr/Overpass-API/blob/master/src/rules/areas.osm3s to see the rules for the features that will be returned by is_in.

permanent link

answered 27 Nov '18, 14:48

maxerickson's gravatar image

accept rate: 32%

Thank you, this actually works perfectly. I just need to make a query with a bounding box and another query for the center point.

(28 Nov '18, 07:38) misotrnka
Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 27 Nov '18, 09:15

question was seen: 2,198 times

last updated: 28 Nov '18, 07:38

powered by OSQA