NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

There are two nearby state forests, "A" and "B". When I use Query Features in OSM, and select a feature like a road or path inside "A", the sidebar includes the state forest "A" as an Enclosing Feature. But when I do the same thing with a feature inside "B", it does not list "B" as an enclosing feature.

I would like to fix "B", so I looked closer at the features and tags.

Both "A" and "B" are closed ways, with landuse=forest and a name. But "A" is the outer-role member of a multipolygon relation, and B is not a member of a relation. That is the only difference. So it seems to me that being a member of a multipolygon relation makes the way a candidate for being an enclosing feature.

Other features I see listed under Enclosing Features are administrative boundaries (with or without multipolygons), so it seems that type=boundary and/or boundary=administrative also makes a closed way appear as an enclosing feature.

Am I right about this? Is there documentation on what causes a closed Way to be listed as an enclosing feature? (I couldn't find anything on the OSM wiki.)

asked 13 Feb '16, 03:22

ljb_nj's gravatar image

accept rate: 12%

edited 13 Feb '16, 08:22

scai's gravatar image

scai ♦

It would help us a lot understanding your issue if you could provide links to "A" and "B".

(14 Feb '16, 08:54) scai ♦

The enclosing features are area features coming from .

There is some discussion here:

I think a landuse=forest should create an area, but maybe it hasn't been generated yet. I used the script below to find out that areas were last generated 2 days ago. Is the feature newer than that?

This is about the simplest script that will return an area:

The timestamp is returned in the output, Overpass Turbo does the math and displays it if you hover over the statistics on the lower right.

permanent link

answered 13 Feb '16, 04:27

maxerickson's gravatar image

accept rate: 32%

edited 13 Feb '16, 04:36


According to the script that generates the areas (areas.osm3s) multipolygon relations are only considered if they have a name tag. This name tag requirement also applies to some other objects (e.g. relations tagged with admin_level or boundary, various ways with certain tags) but not all of them (e.g. relations with postal_code or addr:postcode tag). But that doesn't mean that people should start adding wrong name tags.

(13 Feb '16, 08:21) scai ♦

Thanks for the info. The link lead me to this textual description of what makes a way into a polygon (area):

According to that, landuse=forest on a closed loop way without area=no makes a polygon. But I know that isn't working as far as "enclosing features" goes. I also looked at the area3.osm3s script. With my very limited understanding of it, I see it does use landuse (other than no), with name, and not area=no to make a polygon. I also see the script considers a multipolygon to be a polygon but only if it has a name, and the one ("A" above) does not, yet it does work as an enclosing feature.

I'm going to try to fix my case "B" above - to make it like "A" and see what happens. As much as I would like to understand what is happening, I'm OK with fixing the feature and moving on.

(13 Feb '16, 23:07) ljb_nj

This is very strange, and I obviously don't know what is going on. But after looking at it some more, the problem isn't that the State Forests don't show as Enclosing Features. The problem is that nothing shows as enclosing features. This is happening for large areas of Southern New Jersey, such as here:

When I use Query Features on a road there, I see no Enclosing Features at all. But further south, I see at least a County, State, and Country as Enclosing Features.

Something seems to be blocking it from working there. I thought maybe it was the Pinelands National Reserve area ( ) which is a huge closed way that surrounds this (tags: area=yes, boundary=national_park) but that doesn't seem to be the cause. Enclosing Features works in some places inside this area.

(15 Feb '16, 03:10) ljb_nj

A script like this, with the coordinates copied from a failed query:


(try it here)

Succeeds, so the problem does not seem to be the existence of the areas on the Overpass API server.

Firefox reports an error on the blank results TypeError: e.bounds is undefined, and not on successful results. So the issue is probably in the JS code powering the query feature. Not sure where to begin debugging that, maybe in

(15 Feb '16, 15:14) maxerickson

maxerickson: I think you have figured it out. The areas are OK, but the problem is with the browser and the query. I am seeing almost the same thing: "Error: TypeError: t.bounds is undefined", "Source File:" in my browser. (Using either Firefox or Seamonkey browsers.)

But I suppose it still could be something in the map data that triggers this, which would explain why it only happens in some areas.

(15 Feb '16, 23:31) ljb_nj

I created a ticket for this issue now:

Please follow up there.

(16 Feb '16, 19:33) mmd
showing 5 of 6 show 1 more comments

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]( "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: 13 Feb '16, 03:22

question was seen: 5,096 times

last updated: 16 Feb '16, 19:34

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum