Overpass-API icon indicating copy to clipboard operation
Overpass-API copied to clipboard

barrier=fence not considered a polygon?

Open SinBirb opened this issue 9 years ago • 2 comments

Hi,

I'm referring to this document, defining what Overpass Turbo recognizes as a polygon.

It seems like barrier=fence is not considered, while it should be.

See this example: http://www.openstreetmap.org/way/154070456

I'm trying to execute the following query which returns an empty response while I want it to return all way elements that are contained within the mentioned way object with id 154070456:

<osm-script>
  <id-query ref="154070456" type="area" into="_" />
  <union>
    <query type="way">
      <has-kv k="power" regv="line|pole|minor_line|cable"/>
      <has-kv k="voltage" regv="110000"/>
      <area-query from="_"/>
    </query>
  </union>
  <recurse type="down"/>
  <print />
</osm-script>

SinBirb avatar Apr 27 '16 15:04 SinBirb

barrier=fence is indeed not supported at this time - besides the ref value in your query is not correct, as is it missing a certain offset value for ways. Nevertheless, even with the offset for ways, that query wouldn't return a result, as no correspoinding area was created on the server before. Please see this section in the wiki for details: http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#By_area_.28area.29

For the time being, you can check if the following prototype solution works for you: http://overpass-turbo.eu/s/fWB - it is really only a prototype, no guarantess on long term availability. Also, syntax is very likely to change in the future.

mmd-osm avatar Apr 28 '16 11:04 mmd-osm

It seems like barrier=fence is not considered, while it should be.

I don't think it should. It's a polyline as described in the wiki. Most of the time you have a gate. Right, can be mapped as a node.

And the fence on your example has gone. Time to close the ticket?

Bibi56 avatar Aug 12 '19 20:08 Bibi56