OSM Downloader
Category: Mega-Polis → Gathering → Gathering Design Tools
Node ID:SvMegapolisOSMDownloader
Tooltip: Download an OpenStreetMap file
Dependencies: osmnx
Functionality
Downloads geospatial features from OpenStreetMap using osmnx and saves them locally as a GeoJSON file.
The node supports four different spatial query methods:
- Address + distance radius
- Place name
- Coordinate point + distance radius
- Bounding box (North/South/East/West)
A selected feature tag (e.g., building, amenity, highway, landuse, etc.) is used to build an OSM query dictionary.
The resulting geometries are filtered to keep relevant attributes and then written to disk as a GeoJSON file using the pattern:
folder_path/location_feature.geojson
The node outputs the downloaded dataset as a message/object for downstream workflows.
Inputs
Dynamic inputs (depend on download_method)
| Socket | Type | Description |
|---|---|---|
| Address | SvStringsSocket | Address string used as center point (Address mode) |
| Place | SvStringsSocket | Place name for geocoded boundary download (Place mode) |
| Coordinate_X | SvStringsSocket | Longitude for point-based query (Point mode) |
| Coordinate_Y | SvStringsSocket | Latitude for point-based query (Point mode) |
| North | SvStringsSocket | Northern boundary coordinate (BBox mode) |
| South | SvStringsSocket | Southern boundary coordinate (BBox mode) |
| East | SvStringsSocket | Eastern boundary coordinate (BBox mode) |
| West | SvStringsSocket | Western boundary coordinate (BBox mode) |
| Distance | SvStringsSocket | Radius distance (meters) used for Address and Point modes |
| Folder | SvStringsSocket | Output folder path where the GeoJSON file will be saved |
Visibility rules
| download_method | Visible inputs |
|---|---|
| Address | Address, Distance, Folder |
| Place | Place, Folder |
| Point | Coordinate_X, Coordinate_Y, Distance, Folder |
| Bbox | North, South, East, West, Folder |
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| download | Bool | False | When enabled, triggers the download process |
| download_method | Enum | Address | Selects spatial query type: Address, Place, Point, or Bbox |
| features | Enum | building | OSM tag used to filter downloaded geometries |
Outputs
| Socket | Type | Description |
|---|---|---|
| Output_Message | SvStringsSocket | GeoDataFrame result object (or empty if download disabled) |
How it works
Builds a dictionary using the selected feature:
{ "<feature>": True }Runs one of the osmnx queries:
Address mode
ox.geometries_from_address(address, dictionary, distance)Place mode
ox.geometries_from_place(place, dictionary)Point mode
ox.geometries_from_point((x, y), dictionary, distance)BBox mode
ox.geometries_from_bbox(north, south, east, west, dictionary)
Filters columns to keep common attributes:
- geometry
- building
- amenity
- name
- height
- levels
- tourism
- shop
- office
- healthcare
- geometry
Saves output file using:
folder_path/location_feature.geojson
Example
Address-based download
- Set:
- download_method = Address
- features = building
- download_method = Address
- Connect:
- Address → “Melbourne, Australia”
- Distance → “500”
- Folder → “/tmp/”
- Address → “Melbourne, Australia”
- Enable download.
Example output file:
/tmp/Melbourne Australia_building.geojson
Place-based download
- Set:
- download_method = Place
- features = highway
- download_method = Place
- Connect:
- Place → “Melbourne, Australia”
- Folder → “/tmp/”
- Place → “Melbourne, Australia”
- Enable download.
Point-based download
- Set:
- download_method = Point
- features = amenity
- download_method = Point
- Connect:
- Coordinate_X → “144.9631”
- Coordinate_Y → “-37.8136”
- Distance → “300”
- Folder → “/tmp/”
- Coordinate_X → “144.9631”
Bounding box download
- Set:
- download_method = Bbox
- features = landuse
- download_method = Bbox
- Connect:
- North / South / East / West coordinates
- Folder path
- North / South / East / West coordinates
- Enable download.
Notes
- Output is always saved as GeoJSON.
- File naming is based on the spatial query + feature type.
- This node is designed primarily as a data acquisition tool for downstream Mega-Polis workflows.