Skip to content

Instantly share code, notes, and snippets.

@crossan007
Last active December 14, 2024 02:01
Show Gist options
  • Select an option

  • Save crossan007/aa8c14ae764ef2b7a933731ee7b9bbe0 to your computer and use it in GitHub Desktop.

Select an option

Save crossan007/aa8c14ae764ef2b7a933731ee7b9bbe0 to your computer and use it in GitHub Desktop.
Overpass Turbo Examples / Scratchpad

Live Query App:

https://overpass-turbo.eu/#

Strategies

Identification

  1. Look for "invisible text" (adjust brightness / contrast / colors / levels / threshold / curves)

Searching

  1. Look for groups of businesses
    1. sometimes gas stations can change names, so use ["amenity"="fuel"]
  2. Use substract to remove known false matches

Example Query Snippets

Find Harbors

nwr["seamark:type"="harbour"];

Split Countries by driving_side:

Left

area["driving_side"="left"]["admin_level"="2"]->.leftSideDriving;

Right

area["driving_side"="right"]["admin_level"="2"]->.rightSideDriving;

Exclude locations by id

nwr(area.texas)["healthcare"="pharmacy"]["name"~"cvs",i]->.allCVS;
(
  nwr.allCVS;
  -
  nwr(id:8292180749,384562084,92086146);
)->.filteredCVS;

Find Clusters of bridges

Finds bridges within 2000m of eachother

nwr["bridge"]["highway"]->.allBridges;

(
  nwr.allBridges;
  nwr.allBridges(around:2000);
)->.clusteredBridges;

JoseMonkey Challenges

Geolocation Season 3, Episode 8

https://www.youtube.com/watch?v=mOB_wCW46R4

[out:json];
nwr["amenity"="fuel"]["name"~"76"]->.a76;
nwr["bridge"]["highway"](around.a76:200)->.allBridges;
(
  nwr.allBridges;
  nwr.allBridges(around:2000);
)->.clusteredBridges;
(
  nwr.a76(around.clusteredBridges:200);
)->.candidates;
nwr["amenity"="parking"]["parking"="multi-storey"](around.candidates:60)->.parking;
(
 	nwr.candidates(around.parking:60)(around.clusteredBridges:200);
  nwr.parking;
);
out center;

Geolocation Season 3, Episode 11

https://www.youtube.com/watch?v=DzkgwTpvc8k

[out:json];
/* Step 1: Find all "Hibbett" locations */
node["name"~"Hibbett"]->.hibbett;

/* Step 2: Find "Golden Corral" within 600 meters of any "Hibbett" */
node["name"~"Luxe"](around.hibbett:600)->.luxe;

/* Step 3: Output both datasets (Hibbett and Golden Corral) */
(
  node.hibbett(around.luxe:600);  /* Hibbett nodes near Golden Corral */
  node.luxe;                      /* Golden Corral nodes near Hibbett */
);
out center;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment