v.osm.import.tag - Extracts all data selected by an OSM tag (through the Overpass API as inpuit source) within a specified area (geojson or vector in GRASS as input) and outputs a geojson and a vector file in GRASS.
Convert lines to polygons; Attention: This works only if the polygon contains only one LineString!
-f
Allow failing query or rather no matching feature found. If this flag is not set, the module will fail if no matching feature is found for the query. If the flag is set, the module will continue without output generation (Reasonable if sure that query is correct, but aoi_map might not contatin requested query).
--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:
aoi_map=name
Name of input vector map
Existing vector AOI map in GRASS as input
geojson=name
Name of AOI geojson file as input
osm_tag=string[,string,...][required]
OSM tag for querying a specific part of OSM data(form: 'way["highway"]')
attributes=string[,string,...]
Keys from OSM tags which shall be extracted for attribute table of output vector (e.g. surface,access,...)
output=name[required]
Output name of processing result vector map
retries=integer
Number of times to retry the Overpass API query. Default: 4
Default: 4
tool=string
Tool to download OSM data. Options: overpass, osmnx. Default: overpass
v.osm.import.tag extracts data from OpenStreetMap by using a
specific OSM tag.
This is possible by using the Overpass API
as input source or by "incomplete polygon" in the data
OSMnx.
As input area of interest you can use a vector in GRASS GIS or an external geojson file.
While using an OSM tag satisfy the necessary pattern.
OSM-GPT can be used to find the corresponding OSM tag.
Download OSM "highways" by their OSM tag('way["highway"]') in a specific area by
using an existing vector map (area_of_interest) and defining an output name (highways).
Download OSM "highways" by their OSM tag('way["highway"]') in a specific area by
using a geojson file (area_geojson) and defining an output name (highways).
For specifying your query you can use a combination of a key and a value. For example
use 'way["amenity"="hospitals"]' for downloading all hospitals in your area of interest.
For specifying your query you can use multiple OSM tags. For example
use 'way["amenity"="parking"],way["parking"="surface"]' for downloading all parking areas,
which are either tagged with ["amenity"="parking"] or ["parking"="surface"] in your area of interest.
In order to only keep attributes of interests in the table of the output vector, specify keys of OSM Tags
in attributes=[...] (e.g. attributes=amenity,parking,access)
Beware of using the right data type (node, way, relation) provided in OSM.
Sometimes there is more than one datatype for the same OSM tag. For example, hospitals are
mapped as polygons and points sometimes so you should use the respective data types to be
sure that you get all mapped features related to your tag.
Find your tag at the OSM Wiki!