You are not logged in.

#1 2020-11-03 13:00:17

VIPINDAS K
New Member
Registered: 2020-10-18
Posts: 1

Overpass query

A school will have a number of buildings and they will be located close by.  I tried with overpass the query which can select only one of these buildings and skip the rest.  But not Proper working.  Can you tell me the query for that ....

https://overpass-turbo.eu/s/ZEM

[out:json]
[timeout:25];

way({{bbox}})[amenity=school];

map_to_area ->.area;

(
  
   (
    node ["building"="school"]({{bbox}});
    way  ["building"="school"]({{bbox}});
   )->.scl;
  
   (
 
  (
    node ["building"="school"]["amenity"!~"."]({{bbox}});
    way  ["building"="school"]["amenity"!~"."]({{bbox}});
  );
  - 
  (
    // All nodes+ways with building=school and no amenity=* tag in area
    node ["building"="school"]["amenity"!~"."](area.area);
    way  ["building"="school"]["amenity"!~"."](area.area);    
  );)->.samp1;
   (
    node.samp1(around.scl:100);
    way.samp1(around.scl:100);
   )->.near;
  (.samp1; - .near;);
);
 out center;

Offline

Board footer

Powered by FluxBB