[OSM-talk] Best way to find nodes within given way outlines?

Clifford Snow clifford at snowandsnow.us
Fri Apr 24 23:13:56 UTC 2015


On Fri, Apr 24, 2015 at 3:57 PM, Bryce Nesbitt <bryce2 at obviously.com> wrote:

> I've asked around several times, but never found an answer.
>
> What's the best way to do intersection queries on OSM data.?
>
> For example: find all amenity=fuel inside of an airport polygon.
>

The following example works to find all artwork inside of a zoo - Is this
the kind of query you want?

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“tourism=artwork in "woodland park zoo"”
*/
[out:json][timeout:25];
// fetch area “woodland park zoo” to search in
{{geocodeArea:woodland park zoo}}->.searchArea;
// gather results
(
  // query part for: “tourism=artwork”
  node["tourism"="artwork"](area.searchArea);
  way["tourism"="artwork"](area.searchArea);
  relation["tourism"="artwork"](area.searchArea);
);
// print results
out body;
>;
out skel qt;


-- 
@osm_seattle
osm_seattle.snowandsnow.us
OpenStreetMap: Maps with a human touch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20150424/d7af282d/attachment.html>


More information about the talk mailing list