pyorps.io.vector_loader

PYORPS: An Open-Source Tool for Automated Power Line Routing

Reference: [1] Hofmann, M., Stetz, T., Kammer, F., Repo, S.: ‘PYORPS: An Open-Source Tool for

Automated Power Line Routing’, CIRED 2025 - 28th Conference and Exhibition on Electricity Distribution, 16 - 19 June 2025, Geneva, Switzerland

Functions

load_from_wfs(url, layer[, bbox, mask, ...])

Load data from a Web Feature Service (WFS) using chunked loading.

pyorps.io.vector_loader.load_from_wfs(url, layer, bbox=None, mask=None, filter_params=None, auto_match=True, max_workers=4)[source]

Load data from a Web Feature Service (WFS) using chunked loading.

Parameters:
  • url (str) – The base URL of the WFS service

  • layer (str) – Name of the layer to retrieve

  • bbox (Polygon | GeoDataFrame | GeoSeries | tuple[float, float, float, float] | None) – Optional bounding box to limit the query extent (minx, miny, maxx, maxy)

  • mask (Polygon | GeoDataFrame | tuple | None) – Optional geometry mask to limit the query (Shapely Polygon, GeoDataFrame, or GeoSeries)

  • filter_params (dict | None) – Additional WFS parameters to filter results

  • auto_match (bool) – Whether to attempt finding similar layer names if exact match not found

  • max_workers (int) – Maximum number of parallel threads to use

Returns:

Loaded GeoDataFrame or None if no data could be loaded

Raises:

WFSLayerNotFoundError – If the layer cannot be found and auto_match is False

Return type:

GeoDataFrame | None