Advanced OSM Queries for Intelligence
This lesson builds on the fundamentals of Overpass Turbo to create more sophisticated queries for intelligence gathering and analysis.
Combining Multiple Criteria
Advanced intelligence work often requires combining multiple search criteria:
[out:json];
{{geocodeArea:Kiev}}->.searchArea;
(
// Government facilities
node["office"="government"](area.searchArea);
way["office"="government"](area.searchArea);
// Critical infrastructure
node["power"="substation"](area.searchArea);
way["power"="substation"](area.searchArea);
// Transportation hubs
node["aeroway"="aerodrome"](area.searchArea);
way["aeroway"="aerodrome"](area.searchArea);
node["railway"="station"](area.searchArea);
);
out body;
out skel qt;
Advanced Filters and Operators
Regular Expressions
Use regular expressions to find patterns in tags:
// Find all military facilities containing "base" or "training" in name
node["military"]["name"~"base|training", i](area.searchArea);
Boolean Logic
Combine criteria with boolean logic:
// Buildings that are either government offices OR have security systems
node["building"]["office"="government"](area.searchArea);
node["building"]["security_system"](area.searchArea);
Working with Relations
Relations in OSM represent complex features like multipolygons or routes:
// Find border crossing points
relation["boundary"="administrative"]["admin_level"="2"];
node(r:"outer")["barrier"="border_control"];
Spatial Analysis Techniques
Proximity Analysis
Find elements within a specific distance of a point of interest:
// Security features within 500m of a government building
node["office"="government"](area.searchArea)->.govt;
(
node["security_camera"](around.govt:500);
node["barrier"="checkpoint"](around.govt:500);
);
out body;
Intersection Analysis
Find elements that intersect with other elements:
// Find military facilities that intersect with highways
way["military"](area.searchArea);
way(if:crossing["highway"]);
out geom;
Time-Based Analysis
Query for elements changed within a specific timeframe:
// Security-relevant changes in the last 30 days
[out:json][timeout:300][date:"{{date:30days}}"];
{{geocodeArea:Kyiv}}->.searchArea;
(
node["military"](changed:"{{date:30days}}")(area.searchArea);
way["military"](changed:"{{date:30days}}")(area.searchArea);
node["barrier"](changed:"{{date:30days}}")(area.searchArea);
);
out meta;
Exporting for Advanced Analysis
For deeper analysis in dedicated GEOINT tools:
- Run your advanced query
- Click "Export"
- Choose "GeoJSON" format
- Process the data in QGIS or ArcGIS for:
- Heat mapping
- Network analysis
- Pattern identification
- Overlay with other intelligence sources
Case Study: Area Vulnerability Assessment
This Overpass query identifies critical infrastructure in a target area:
[out:json];
{{geocodeArea:Mariupol}}->.searchArea;
(
// Critical infrastructure
node["power"](area.searchArea);
way["power"](area.searchArea);
node["utility"](area.searchArea);
way["utility"](area.searchArea);
// Command and control
node["office"="government"](area.searchArea);
way["office"="government"](area.searchArea);
node["military"](area.searchArea);
way["military"](area.searchArea);
// Transportation
node["highway"="motorway_junction"](area.searchArea);
way["highway"="motorway"](area.searchArea);
way["highway"="trunk"](area.searchArea);
node["railway"="station"](area.searchArea);
way["aeroway"](area.searchArea);
);
out body;
out skel qt;
Exercise
Develop an advanced intelligence query for a scenario of your choice:
- Select a geographic area of interest
- Define intelligence requirements (what information you need)
- Create an Overpass query that combines multiple data types
- Export the results for further analysis
- Document your intelligence findings based on the query results