diff --git a/docs/src/pages/rustalgos/rustalgos.md b/docs/src/pages/rustalgos/rustalgos.md
index 612a6125..59652702 100644
--- a/docs/src/pages/rustalgos/rustalgos.md
+++ b/docs/src/pages/rustalgos/rustalgos.md
@@ -2726,22 +2726,22 @@ datapoints are not located with high spatial precision.
-node_lives: list[bool]
+node_xs: list[float]
-node_ys: list[float]
+node_xys: list[tuple[float, float]]
-node_xys: list[tuple[float, float]]
+node_lives: list[bool]
-node_xs: list[float]
+node_ys: list[float]
diff --git a/docs/src/pages/tools/io.md b/docs/src/pages/tools/io.md
index 8826eb8e..2f92094b 100644
--- a/docs/src/pages/tools/io.md
+++ b/docs/src/pages/tools/io.md
@@ -332,7 +332,7 @@ builds a graph automatically.
shapely.geometry.polygon.Polygon
-
poly_epsg_code
+
poly_crs_code
int | str
diff --git a/pyproject.toml b/pyproject.toml
index c82ccb83..d13c1c88 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "cityseer"
-version = '4.8.1'
+version = '4.9.0'
description = "Computational tools for network-based pedestrian-scale urban analysis"
readme = "README.md"
requires-python = ">=3.10, <3.12"
diff --git a/pysrc/cityseer/tools/io.py b/pysrc/cityseer/tools/io.py
index bd23d8e2..6a70fff7 100644
--- a/pysrc/cityseer/tools/io.py
+++ b/pysrc/cityseer/tools/io.py
@@ -216,7 +216,7 @@ def fetch_osm_network(osm_request: str, timeout: int = 300, max_tries: int = 3)
def osm_graph_from_poly(
poly_geom: geometry.Polygon,
- poly_epsg_code: int | str = 4326,
+ poly_crs_code: int | str = 4326,
to_crs_code: int | str | None = None,
custom_request: str | None = None,
simplify: bool = True,
@@ -238,7 +238,7 @@ def osm_graph_from_poly(
----------
poly_geom: shapely.Polygon
A shapely Polygon representing the extents for which to fetch the OSM network.
- poly_epsg_code: int | str
+ poly_crs_code: int | str
An integer representing a valid EPSG code for the provided polygon. For example, [4326](https://epsg.io/4326) if
using WGS lng / lat, or [27700](https://epsg.io/27700) if using the British National Grid.
to_crs_code: int | str
@@ -305,12 +305,12 @@ def osm_graph_from_poly(
```
"""
- if poly_epsg_code is not None and not isinstance(poly_epsg_code, (int, str)): # type: ignore
- raise TypeError('Please provide "poly_epsg_code" parameter as int or str')
+ if poly_crs_code is not None and not isinstance(poly_crs_code, (int, str)): # type: ignore
+ raise TypeError('Please provide "poly_crs_code" parameter as int or str')
if to_crs_code is not None and not isinstance(to_crs_code, (int, str)):
raise TypeError('Please provide "to_crs_code" parameter as int or str')
# format for OSM query
- in_transformer = Transformer.from_crs(poly_epsg_code, 4326, always_xy=True)
+ in_transformer = Transformer.from_crs(poly_crs_code, 4326, always_xy=True)
coords = [in_transformer.transform(lng, lat) for lng, lat in poly_geom.exterior.coords]
geom_osm = str.join(" ", [f"{lat} {lng}" for lng, lat in coords])
if custom_request is not None:
diff --git a/tests/tools/test_io.py b/tests/tools/test_io.py
index 28cf57fd..e91c8d81 100644
--- a/tests/tools/test_io.py
+++ b/tests/tools/test_io.py
@@ -155,7 +155,7 @@ def test_osm_graph_from_poly():
# 32630 corresponds to UTM 30N
poly_utm, utm_epsg = io.buffered_point_poly(LNG, LAT, BUFFER, projected=True)
assert utm_epsg == 32630
- network_from_utm = io.osm_graph_from_poly(poly_utm, poly_epsg_code=utm_epsg, simplify=False)
+ network_from_utm = io.osm_graph_from_poly(poly_utm, poly_crs_code=utm_epsg, simplify=False)
# visual check for debugging
# plot.plot_nx(network_from_utm)
assert isinstance(network_from_utm, nx.MultiGraph)