OSM-waterlopen
Waterlopen per type downloaden · download_osm_waterlopen
waterlagen.osm_waterlopen.download_osm_waterlopen
download_osm_waterlopen(
bounds,
target_path=None,
*,
waterway,
data_store=None,
overwrite=False,
endpoint=OVERPASS_ENDPOINT,
timeout=180,
)
Download one open OSM waterway type to source_data/osm.
Each type has its own GeoPackage and layer: osm_canals,
osm_ditches, osm_drains or osm_streams. Underground,
covered and culvert sections are excluded.
Wat krijgt u terug?
| Type | Betekenis |
|---|---|
pathlib.Path
|
GeoPackage with the selected waterway layer in the project CRS. Empty selections produce a valid empty layer. A JSON sidecar records selection and source. |
Instellingen en invoer
| Naam | Type | Betekenis | Standaardwaarde |
|---|---|---|---|
bounds
|
tuple of float
|
xmin, ymin, xmax, ymax in |
Verplicht |
target_path
|
pathlib.Path
|
Override the default GeoPackage path. |
None
|
waterway
|
str
|
OSM waterway type: |
Verplicht |
data_store
|
DataStore
|
Configured source-data location. |
None
|
overwrite
|
bool
|
Replace an existing validated download. Otherwise reuse only when selection, endpoint, CRS and recorded output identity match. A different selection requires another target path or explicit overwrite. |
False
|
endpoint
|
str
|
Overpass interpreter URL. |
OVERPASS_ENDPOINT
|
timeout
|
float
|
Positive HTTP timeout in seconds, default 180. |
180
|
Mogelijke fouten
| Type | Betekenis |
|---|---|
ValueError
|
Invalid bounds, incomplete OSM data or incompatible existing download. |
RuntimeError
|
Overpass request failed. |
Kanalen downloaden · download_osm_canals
waterlagen.osm_waterlopen.download_osm_canals
download_osm_canals(
bounds,
target_path=None,
*,
data_store=None,
overwrite=False,
endpoint=OVERPASS_ENDPOINT,
timeout=180,
)
Download open canals with the same options as download_osm_waterlopen.
Wat krijgt u terug?
| Type | Betekenis |
|---|---|
pathlib.Path
|
GeoPackage with layer |
Instellingen en invoer
| Naam | Type | Betekenis | Standaardwaarde |
|---|---|---|---|
bounds
|
tuple of float
|
xmin, ymin, xmax, ymax in |
Verplicht |
target_path
|
pathlib.Path
|
Output path; defaults to source_data/osm/osm_canals.gpkg. |
None
|
data_store
|
DataStore
|
Configured source-data location. |
None
|
overwrite
|
bool
|
Replace an existing download. Otherwise reuse only matching selections. |
False
|
endpoint
|
str
|
Overpass interpreter URL. |
OVERPASS_ENDPOINT
|
timeout
|
float
|
Positive HTTP timeout in seconds, default 180. |
180
|
Duikers downloaden · download_osm_culverts
waterlagen.osm_waterlopen.download_osm_culverts
download_osm_culverts(
bounds,
target_path=None,
*,
data_store=None,
overwrite=False,
endpoint=OVERPASS_ENDPOINT,
timeout=180,
)
Download OSM ways tagged tunnel=culvert, regardless of waterway type.
Wat krijgt u terug?
| Type | Betekenis |
|---|---|
pathlib.Path
|
GeoPackage with layer |
Instellingen en invoer
| Naam | Type | Betekenis | Standaardwaarde |
|---|---|---|---|
bounds
|
tuple of float
|
xmin, ymin, xmax, ymax in |
Verplicht |
target_path
|
pathlib.Path
|
Output path; defaults to source_data/osm/osm_culverts.gpkg. |
None
|
data_store
|
DataStore
|
Configured source-data location. |
None
|
overwrite
|
bool
|
Replace an existing download. Otherwise reuse only when selection, endpoint, CRS and recorded output identity match. |
False
|
endpoint
|
str
|
Overpass interpreter URL. |
OVERPASS_ENDPOINT
|
timeout
|
float
|
Positive HTTP timeout in seconds, default 180. |
180
|
Mogelijke fouten
| Type | Betekenis |
|---|---|
ValueError
|
Invalid bounds, incomplete OSM data or incompatible existing download. |
RuntimeError
|
Overpass request failed. |
Redactie: AI