Skip to content

Commit

Permalink
adds docs for visibility module
Browse files Browse the repository at this point in the history
  • Loading branch information
songololo committed Dec 29, 2023
1 parent 760e46e commit 072cd9f
Show file tree
Hide file tree
Showing 9 changed files with 537 additions and 83 deletions.
207 changes: 204 additions & 3 deletions docs/src/pages/rustalgos/rustalgos.md
Original file line number Diff line number Diff line change
Expand Up @@ -2726,7 +2726,7 @@ datapoints are not located with high spatial precision.



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



Expand All @@ -2736,12 +2736,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_xs</span><span class="annotation">: list[float]</span>




<span class="name">node_xs</span><span class="annotation">: list[float]</span>
<span class="name">node_lives</span><span class="annotation">: list[bool]</span>



Expand Down Expand Up @@ -2826,5 +2826,206 @@ datapoints are not located with high spatial precision.
</div>


<div class="class">


## Viewshed




<div class="function">

## Viewshed


<div class="content">
<span class="name">Viewshed</span><div class="signature">
<span class="pt">(</span>
<span class="pt">)</span>
</div>
</div>

</div>



<div class="function">

## progress_init


<div class="content">
<span class="name">progress_init</span><div class="signature multiline">
<span class="pt">(</span>
<div class="param">
<span class="pn">self</span>
</div>
<div class="param">
<span class="pn">/</span>
</div>
<span class="pt">)</span>
</div>
</div>

</div>



<div class="function">

## progress


<div class="content">
<span class="name">progress</span><div class="signature">
<span class="pt">(</span>
<div class="param">
<span class="pn">self</span>
</div>
<span class="pt">)-&gt;[</span>
<span class="pr">int</span>
<span class="pt">]</span>
</div>
</div>

</div>



<div class="function">

## visibility_graph


<div class="content">
<span class="name">visibility_graph</span><div class="signature multiline">
<span class="pt">(</span>
<div class="param">
<span class="pn">self</span>
</div>
<div class="param">
<span class="pn">bldgs_rast</span>
</div>
<div class="param">
<span class="pn">view_distance</span>
<span class="pc">:</span>
<span class="pa"> int</span>
</div>
<div class="param">
<span class="pn">pbar_disabled</span>
<span class="pc">:</span>
<span class="pa"> bool = False</span>
</div>
<span class="pt">)-&gt;[</span>
<span class="pr">Any]]</span>
<span class="pr">Any]]]</span>
<span class="pr">bool</span>
<span class="pr">int</span>
<span class="pr">float</span>
<span class="pr">complex</span>
<span class="pr">str</span>
<span class="pr">bytes</span>
<span class="pr">Union[bool</span>
<span class="pr">int</span>
<span class="pr">float</span>
<span class="pr">complex</span>
<span class="pr">str</span>
<span class="pr">bytes]]]</span>
<span class="pr">Any]]</span>
<span class="pr">Any]]]</span>
<span class="pr">bool</span>
<span class="pr">int</span>
<span class="pr">float</span>
<span class="pr">complex</span>
<span class="pr">str</span>
<span class="pr">bytes</span>
<span class="pr">Union[bool</span>
<span class="pr">int</span>
<span class="pr">float</span>
<span class="pr">complex</span>
<span class="pr">str</span>
<span class="pr">bytes]]]</span>
<span class="pr">Any]]</span>
<span class="pr">Any]]]</span>
<span class="pr">bool</span>
<span class="pr">int</span>
<span class="pr">float</span>
<span class="pr">complex</span>
<span class="pr">str</span>
<span class="pr">bytes</span>
<span class="pr">Union[bool</span>
<span class="pr">int</span>
<span class="pr">float</span>
<span class="pr">complex</span>
<span class="pr">str</span>
<span class="pr">bytes</span>
<span class="pt">]</span>
</div>
</div>

</div>



<div class="function">

## viewshed


<div class="content">
<span class="name">viewshed</span><div class="signature multiline">
<span class="pt">(</span>
<div class="param">
<span class="pn">self</span>
</div>
<div class="param">
<span class="pn">bldgs_rast</span>
</div>
<div class="param">
<span class="pn">view_distance</span>
<span class="pc">:</span>
<span class="pa"> int</span>
</div>
<div class="param">
<span class="pn">origin_x</span>
<span class="pc">:</span>
<span class="pa"> int</span>
</div>
<div class="param">
<span class="pn">origin_y</span>
<span class="pc">:</span>
<span class="pa"> int</span>
</div>
<div class="param">
<span class="pn">pbar_disabled</span>
<span class="pc">:</span>
<span class="pa"> bool = False</span>
</div>
<span class="pt">)-&gt;[</span>
<span class="pr">dtype[Any]]</span>
<span class="pr">dtype[Any]]]</span>
<span class="pr">bool</span>
<span class="pr">int</span>
<span class="pr">float</span>
<span class="pr">complex</span>
<span class="pr">str</span>
<span class="pr">bytes</span>
<span class="pr">_NestedSequence[Union[bool</span>
<span class="pr">int</span>
<span class="pr">float</span>
<span class="pr">complex</span>
<span class="pr">str</span>
<span class="pr">bytes</span>
<span class="pt">]</span>
</div>
</div>

</div>


</div>



</section>
48 changes: 13 additions & 35 deletions docs/src/pages/tools/io.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,13 @@ layout: ../../layouts/PageLayout.astro


<div class="content">
<span class="name">nx_wgs_to_utm</span><div class="signature multiline">
<span class="name">nx_wgs_to_utm</span><div class="signature">
<span class="pt">(</span>
<div class="param">
<span class="pn">nx_multigraph</span>
<span class="pc">:</span>
<span class="pa"> networkx.classes.multigraph.MultiGraph</span>
</div>
<div class="param">
<span class="pn">force_zone_number</span>
<span class="pc">:</span>
<span class="pa"> int | None = None</span>
</div>
<span class="pt">)-&gt;[</span>
<span class="pr">MultiGraph</span>
<span class="pt">]</span>
Expand All @@ -123,16 +118,6 @@ layout: ../../layouts/PageLayout.astro
A `networkX` `MultiGraph` with `x` and `y` node attributes in the WGS84 coordinate system. Optional `geom` edge attributes containing `LineString` geoms to be converted.</div>
</div>

<div class="param-set">
<div class="def">
<div class="name">force_zone_number</div>
<div class="type">int</div>
</div>
<div class="desc">

An optional UTM zone number for coercing all conversions to an explicit UTM zone. Use with caution: mismatched UTM zones may introduce substantial distortions in the results.</div>
</div>

### Returns
<div class="param-set">
<div class="def">
Expand Down Expand Up @@ -171,17 +156,20 @@ layout: ../../layouts/PageLayout.astro
<span class="pc">:</span>
<span class="pa"> int</span>
</div>
<div class="param">
<span class="pn">projected</span>
<span class="pc">:</span>
<span class="pa"> bool = False</span>
</div>
<span class="pt">)-&gt;[</span>
<span class="pr">Polygon</span>
<span class="pr">Polygon</span>
<span class="pr">int</span>
<span class="pr">str</span>
<span class="pt">]</span>
</div>
</div>


Buffer a point and return a `shapely` Polygon in WGS and UTM coordinates. This function can be used to prepare a `poly_wgs` `Polygon` for passing to [`osm_graph_from_poly()`](#osm-graph-from-poly).
Buffer a point and return a `shapely` Polygon. This function can be used to prepare a buffered point `Polygon` for passing to [`osm_graph_from_poly()`](#osm-graph-from-poly). Expects WGS 84 / EPSG 4326 input coordinates. If `projected` is `True` then a UTM converted polygon will be returned. Otherwise returned as WGS 84 polygon in geographic coords.
### Parameters
<div class="param-set">
<div class="def">
Expand Down Expand Up @@ -213,25 +201,25 @@ layout: ../../layouts/PageLayout.astro
The buffer distance in metres.</div>
</div>

### Returns
<div class="param-set">
<div class="def">
<div class="name"></div>
<div class="type">geometry.Polygon</div>
<div class="name">projected</div>
<div class="type">bool</div>
</div>
<div class="desc">

A `shapely` `Polygon` in WGS coordinates.</div>
Whether to project the returned polygon to a local UTM projected coordinate reference system.</div>
</div>

### Returns
<div class="param-set">
<div class="def">
<div class="name"></div>
<div class="type">geometry.Polygon</div>
</div>
<div class="desc">

A `shapely` `Polygon` in UTM coordinates.</div>
A `shapely` `Polygon` in WGS coordinates.</div>
</div>

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

The UTM zone number used for conversion.</div>
</div>

<div class="param-set">
<div class="def">
<div class="name"></div>
<div class="type">str</div>
</div>
<div class="desc">

The UTM zone letter used for conversion.</div>
The UTM EPSG code.</div>
</div>


Expand Down
Loading

0 comments on commit 072cd9f

Please sign in to comment.