Skip to content

Commit

Permalink
adds support for string formatted and alternative e.g. ESRI CRS
Browse files Browse the repository at this point in the history
  • Loading branch information
songololo committed Dec 31, 2023
1 parent dc81416 commit 51c9733
Show file tree
Hide file tree
Showing 10 changed files with 146 additions and 134 deletions.
60 changes: 30 additions & 30 deletions docs/src/pages/metrics/visibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ layout: ../../layouts/PageLayout.astro
<span class="pa"> str</span>
</div>
<div class="param">
<span class="pn">from_epsg_code</span>
<span class="pn">from_crs_code</span>
<span class="pc">:</span>
<span class="pa"> int</span>
<span class="pa"> int | str</span>
</div>
<div class="param">
<span class="pn">to_epsg_code</span>
<span class="pn">to_crs_code</span>
<span class="pc">:</span>
<span class="pa"> int | None = None</span>
<span class="pa"> int | str | None = None</span>
</div>
<div class="param">
<span class="pn">view_distance</span>
Expand Down Expand Up @@ -76,7 +76,7 @@ layout: ../../layouts/PageLayout.astro
</div>
<div class="desc">

A tuple specifying the bounds corresponding to the provided `from_epsg_code` parameter.</div>
A tuple specifying the bounds corresponding to the provided `from_crs_code` parameter.</div>
</div>

<div class="param-set">
Expand All @@ -91,8 +91,8 @@ layout: ../../layouts/PageLayout.astro

<div class="param-set">
<div class="def">
<div class="name">from_epsg_code</div>
<div class="type">int</div>
<div class="name">from_crs_code</div>
<div class="type">int | str</div>
</div>
<div class="desc">

Expand All @@ -101,8 +101,8 @@ layout: ../../layouts/PageLayout.astro

<div class="param-set">
<div class="def">
<div class="name">to_epsg_code</div>
<div class="type">int | None = None</div>
<div class="name">to_crs_code</div>
<div class="type">int | str | None = None</div>
</div>
<div class="desc">

Expand Down Expand Up @@ -152,9 +152,9 @@ layout: ../../layouts/PageLayout.astro
<span class="pa"> str</span>
</div>
<div class="param">
<span class="pn">to_epsg_code</span>
<span class="pn">to_crs_code</span>
<span class="pc">:</span>
<span class="pa"> int | None = None</span>
<span class="pa"> int | str | None = None</span>
</div>
<div class="param">
<span class="pn">view_distance</span>
Expand All @@ -180,7 +180,7 @@ layout: ../../layouts/PageLayout.astro
</div>
<div class="desc">

A tuple specifying the bounds corresponding to the provided `from_epsg_code` parameter.</div>
A tuple specifying the bounds corresponding to the provided `from_crs_code` parameter.</div>
</div>

<div class="param-set">
Expand All @@ -195,8 +195,8 @@ layout: ../../layouts/PageLayout.astro

<div class="param-set">
<div class="def">
<div class="name">to_epsg_code</div>
<div class="type">int | None = None</div>
<div class="name">to_crs_code</div>
<div class="type">int | str | None = None</div>
</div>
<div class="desc">

Expand Down Expand Up @@ -261,14 +261,14 @@ layout: ../../layouts/PageLayout.astro
<span class="pa"> str</span>
</div>
<div class="param">
<span class="pn">from_epsg_code</span>
<span class="pn">from_crs_code</span>
<span class="pc">:</span>
<span class="pa"> int</span>
<span class="pa"> int | str</span>
</div>
<div class="param">
<span class="pn">to_epsg_code</span>
<span class="pn">to_crs_code</span>
<span class="pc">:</span>
<span class="pa"> int | None = None</span>
<span class="pa"> int | str | None = None</span>
</div>
<div class="param">
<span class="pn">view_distance</span>
Expand Down Expand Up @@ -304,7 +304,7 @@ layout: ../../layouts/PageLayout.astro
</div>
<div class="desc">

A tuple specifying the bounds corresponding to the provided `from_epsg_code` parameter.</div>
A tuple specifying the bounds corresponding to the provided `from_crs_code` parameter.</div>
</div>

<div class="param-set">
Expand All @@ -314,7 +314,7 @@ layout: ../../layouts/PageLayout.astro
</div>
<div class="desc">

An easting or longitude for the origin of the viewshed in the `from_epsg_code` coordinate reference system.</div>
An easting or longitude for the origin of the viewshed in the `from_crs_code` coordinate reference system.</div>
</div>

<div class="param-set">
Expand All @@ -324,7 +324,7 @@ layout: ../../layouts/PageLayout.astro
</div>
<div class="desc">

A northing or latitude for the origin of the viewshed in the `from_epsg_code` coordinate reference system.</div>
A northing or latitude for the origin of the viewshed in the `from_crs_code` coordinate reference system.</div>
</div>

<div class="param-set">
Expand All @@ -339,8 +339,8 @@ layout: ../../layouts/PageLayout.astro

<div class="param-set">
<div class="def">
<div class="name">from_epsg_code</div>
<div class="type">int</div>
<div class="name">from_crs_code</div>
<div class="type">int | str</div>
</div>
<div class="desc">

Expand All @@ -349,8 +349,8 @@ layout: ../../layouts/PageLayout.astro

<div class="param-set">
<div class="def">
<div class="name">to_epsg_code</div>
<div class="type">int | None = None</div>
<div class="name">to_crs_code</div>
<div class="type">int | str | None = None</div>
</div>
<div class="desc">

Expand Down Expand Up @@ -410,9 +410,9 @@ layout: ../../layouts/PageLayout.astro
<span class="pa"> str</span>
</div>
<div class="param">
<span class="pn">to_epsg_code</span>
<span class="pn">to_crs_code</span>
<span class="pc">:</span>
<span class="pa"> int | None = None</span>
<span class="pa"> int | str | None = None</span>
</div>
<div class="param">
<span class="pn">view_distance</span>
Expand All @@ -438,7 +438,7 @@ layout: ../../layouts/PageLayout.astro
</div>
<div class="desc">

A tuple specifying the bounds corresponding to the provided `from_epsg_code` parameter.</div>
A tuple specifying the bounds corresponding to the provided `from_crs_code` parameter.</div>
</div>

<div class="param-set">
Expand Down Expand Up @@ -473,8 +473,8 @@ layout: ../../layouts/PageLayout.astro

<div class="param-set">
<div class="def">
<div class="name">to_epsg_code</div>
<div class="type">int | None = None</div>
<div class="name">to_crs_code</div>
<div class="type">int | str | None = None</div>
</div>
<div class="desc">

Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/rustalgos/rustalgos.md
Original file line number Diff line number Diff line change
Expand Up @@ -2731,12 +2731,12 @@ datapoints are not located with high spatial precision.



<span class="name">node_xys</span><span class="annotation">: list[tuple[float, float]]</span>
<span class="name">node_ys</span><span class="annotation">: list[float]</span>




<span class="name">node_ys</span><span class="annotation">: list[float]</span>
<span class="name">node_xys</span><span class="annotation">: list[tuple[float, float]]</span>



Expand Down
34 changes: 17 additions & 17 deletions docs/src/pages/tools/io.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ layout: ../../layouts/PageLayout.astro
<span class="pa"> networkx.classes.multigraph.MultiGraph</span>
</div>
<div class="param">
<span class="pn">from_epsg_code</span>
<span class="pn">from_crs_code</span>
<span class="pc">:</span>
<span class="pa"> int</span>
<span class="pa"> int | str</span>
</div>
<div class="param">
<span class="pn">to_epsg_code</span>
<span class="pn">to_crs_code</span>
<span class="pc">:</span>
<span class="pa"> int</span>
<span class="pa"> int | str</span>
</div>
<span class="pt">)-&gt;[</span>
<span class="pr">MultiGraph</span>
Expand All @@ -39,7 +39,7 @@ layout: ../../layouts/PageLayout.astro
</div>


Convert a graph from the `from_epsg_code` EPSG CRS to the `to_epsg_code` EPSG CRS. The `to_epsg_code` must be for a projected CRS. If edge `geom` attributes are found, the associated `LineString` geometries will also be converted.
Convert a graph from the `from_crs_code` EPSG CRS to the `to_crs_code` EPSG CRS. The `to_crs_code` must be for a projected CRS. If edge `geom` attributes are found, the associated `LineString` geometries will also be converted.
### Parameters
<div class="param-set">
<div class="def">
Expand All @@ -48,13 +48,13 @@ layout: ../../layouts/PageLayout.astro
</div>
<div class="desc">

A `networkX` `MultiGraph` with `x` and `y` node attributes in the `from_epsg_code` coordinate system. Optional `geom` edge attributes containing `LineString` geoms to be converted.</div>
A `networkX` `MultiGraph` with `x` and `y` node attributes in the `from_crs_code` coordinate system. Optional `geom` edge attributes containing `LineString` geoms to be converted.</div>
</div>

<div class="param-set">
<div class="def">
<div class="name">from_epsg_code</div>
<div class="type">int</div>
<div class="name">from_crs_code</div>
<div class="type">int | str</div>
</div>
<div class="desc">

Expand All @@ -63,8 +63,8 @@ layout: ../../layouts/PageLayout.astro

<div class="param-set">
<div class="def">
<div class="name">to_epsg_code</div>
<div class="type">int</div>
<div class="name">to_crs_code</div>
<div class="type">int | str</div>
</div>
<div class="desc">

Expand All @@ -79,7 +79,7 @@ layout: ../../layouts/PageLayout.astro
</div>
<div class="desc">

A `networkX` `MultiGraph` with `x` and `y` node attributes converted to the specified `to_epsg_code` coordinate system. Edge `geom` attributes will also be converted if found.</div>
A `networkX` `MultiGraph` with `x` and `y` node attributes converted to the specified `to_crs_code` coordinate system. Edge `geom` attributes will also be converted if found.</div>
</div>


Expand Down Expand Up @@ -334,12 +334,12 @@ builds a graph automatically.
<div class="param">
<span class="pn">poly_epsg_code</span>
<span class="pc">:</span>
<span class="pa"> int = 4326</span>
<span class="pa"> int | str = 4326</span>
</div>
<div class="param">
<span class="pn">to_epsg_code</span>
<span class="pn">to_crs_code</span>
<span class="pc">:</span>
<span class="pa"> int | None = None</span>
<span class="pa"> int | str | None = None</span>
</div>
<div class="param">
<span class="pn">custom_request</span>
Expand Down Expand Up @@ -408,7 +408,7 @@ builds a graph automatically.
<div class="param-set">
<div class="def">
<div class="name">poly_epsg_code</div>
<div class="type">int</div>
<div class="type">int | str</div>
</div>
<div class="desc">

Expand All @@ -417,8 +417,8 @@ builds a graph automatically.

<div class="param-set">
<div class="def">
<div class="name">to_epsg_code</div>
<div class="type">int</div>
<div class="name">to_crs_code</div>
<div class="type">int | str</div>
</div>
<div class="desc">

Expand Down
18 changes: 9 additions & 9 deletions docs/src/pages/tools/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -805,14 +805,14 @@ layout: ../../layouts/PageLayout.astro
<span class="pn">geom</span>
</div>
<div class="param">
<span class="pn">from_epsg_code</span>
<span class="pn">from_crs_code</span>
<span class="pc">:</span>
<span class="pa"> int</span>
<span class="pa"> int | str</span>
</div>
<div class="param">
<span class="pn">to_epsg_code</span>
<span class="pn">to_crs_code</span>
<span class="pc">:</span>
<span class="pa"> int</span>
<span class="pa"> int | str</span>
</div>
<span class="pt">)</span>
</div>
Expand All @@ -833,8 +833,8 @@ layout: ../../layouts/PageLayout.astro

<div class="param-set">
<div class="def">
<div class="name">from_epsg_code</div>
<div class="type">int</div>
<div class="name">from_crs_code</div>
<div class="type">int | str</div>
</div>
<div class="desc">

Expand All @@ -843,8 +843,8 @@ layout: ../../layouts/PageLayout.astro

<div class="param-set">
<div class="def">
<div class="name">to_epsg_code</div>
<div class="type">int</div>
<div class="name">to_crs_code</div>
<div class="type">int | str</div>
</div>
<div class="desc">

Expand All @@ -859,7 +859,7 @@ layout: ../../layouts/PageLayout.astro
</div>
<div class="desc">

A shapely geometry in the specified `to_epsg_code` projection.</div>
A shapely geometry in the specified `to_crs_code` projection.</div>
</div>


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cityseer"
version = '4.8.0'
version = '4.8.1'
description = "Computational tools for network-based pedestrian-scale urban analysis"
readme = "README.md"
requires-python = ">=3.10, <3.12"
Expand Down
Loading

0 comments on commit 51c9733

Please sign in to comment.