GRASS logo

NAME

d.osm - Fetch OSM features (military installations, checkpoints, power infrastructure, communications towers) from Overpass for the current region and display them.

KEYWORDS

display, vector, OSM, OSINT

SYNOPSIS

d.osm
d.osm --help
d.osm [types=string[,string,...]] [output=name] [format=string] [size=integer] [endpoint=string] [timeout=integer] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

types=string[,string,...]
Which feature types to query (default: all)
Options: military_airfield, military_base, bunker, naval_base, training_area, checkpoint, border_control, power_plant, substation, communications_tower, civilian_airport, port_harbour, ferry_terminal, railway_station, toll_booth, bridge, tunnel
output=name
Name for the imported vector map
Default: osm
format=string
symbols renders each feature type with its icon; attributes only prints the matching attribute table
Options: symbols, attributes
Default: symbols
size=integer
Symbol size in format=symbols mode
Default: 20
endpoint=string
Overpass API endpoint URL
Default: https://overpass-api.de/api/interpreter
timeout=integer
Overpass query timeout in seconds
Default: 60

Table of contents

DESCRIPTION

d.osm fetches OSINT-relevant OpenStreetMap features -- military installations, checkpoints, power infrastructure, communications towers, and transportation chokepoints -- live from the public Overpass API for the current GRASS computational region, and displays them with pre-baked GRASS symbols shipped with this addon. Seventeen feature types are recognized:
typeOSM tag
military_airfieldmilitary=airfield
military_basemilitary=base
bunkermilitary=bunker
naval_basemilitary=naval_base
training_areamilitary=training_area
checkpointbarrier=checkpoint
border_controlamenity=border_control
power_plantpower=plant
substationpower=substation
communications_towerman_made=communications_tower
civilian_airportaeroway=aerodrome
port_harbourharbour=yes
ferry_terminalamenity=ferry_terminal
railway_stationrailway=station
toll_boothbarrier=toll_booth
bridgebridge=yes + (highway=* or railway=*)
tunneltunnel=yes + (highway=* or railway=*)
bridge and tunnel are the two exceptions to "one OSM tag per type": in OSM these are modifier tags on a road/rail way, not a standalone tag=value pair, so matching requires both the modifier tag and a carrier tag (highway or railway, any value) on the same element -- bridge=yes alone (e.g. on a building) does not match. Unlike the d.osint addon, d.osm has no local database -- every run queries Overpass live for whatever region is currently set with g.region (reprojected to lat/lon automatically, regardless of the current project's CRS), and nothing is cached between runs. It also has no dependency on any other project's code: only the Python standard library and grass.script are used, and all 17 GRASS symbol files are embedded as static text generated once, ahead of time -- there is no live SVG-to-symbol conversion step at runtime.

NOTES

EXAMPLES

Show every recognized feature type in the current region:
g.region region=my_area_of_interest
d.mon start=cairo
d.osm
Only checkpoints and border crossings, as an attribute table:
d.osm types=checkpoint,border_control format=attributes
Query against a self-hosted Overpass instance:
d.osm endpoint=http://localhost:12345/api/interpreter

SEE ALSO

v.in.ogr, d.vect, g.region The private d.osint addon is a related, database-backed companion to this tool, built for a specific local OSINTDB rather than live queries.

AUTHORS

Yann Chemin

SOURCE CODE

Available at: d.osm source code (history)

Accessed: Monday Jul 27 12:22:20 2026


Main index | Display index | Topics index | Keywords index | Graphical index | Full index

© 2003-2026 GRASS Development Team, GRASS 8.5.1dev Reference Manual