Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/tutorials/external/spatial_ecology_geocomp.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ execute:
![](images/spatial_ecology.png){.preview-image}

The following tutorials were developed as part of the
[Spatial Ecology courses](https://spatial-ecology.net/training/),
[Spatial Ecology courses](https://spatial-ecology.net/),
where students are introduced to an array of powerful open-source geocomputation tools and machine learning methodologies under the Linux environment.

## GRASS Introduction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ fractal = tools.r_surf_fractal(output=np.array, seed=6)

Directly passing NumPy arrays to GRASS tools and receiving them back is a new feature in GRASS v8.5.
If you work with older versions of GRASS, you can use
[grass.script.array](https://grass.osgeo.org/grass-stable/manuals/libpython/grass.script.html#script.array.array):
[grass.script.array](https://grass.osgeo.org/grass-stable/manuals/libpython/grass.script.html#grass.script.array.array):

```{python}
import grass.script as gs
Expand Down Expand Up @@ -242,7 +242,7 @@ For creating a stream network with gullies using GRASS, see the
:::

Now if we want to store the eroded topography as a native GRASS raster, we can use
[grass.script.array](https://grass.osgeo.org/grass-stable/manuals/libpython/grass.script.html#script.array.array)
[grass.script.array](https://grass.osgeo.org/grass-stable/manuals/libpython/grass.script.html#grass.script.array.array)
to create a GRASS array object with the dimensions given by the current computational region.
Then we copy the NumPy array and write the raster map as GRASS native raster.

Expand All @@ -259,7 +259,7 @@ grass_elevation.write("elevation")

::: {.callout-note title="What about N-dimensional arrays?"}

For 3D arrays, you can use [grass.script.array3d](https://grass.osgeo.org/grass-stable/manuals/libpython/grass.script.html#script.array.array3d) package.
For 3D arrays, you can use [grass.script.array3d](https://grass.osgeo.org/grass-stable/manuals/libpython/grass.script.html#grass.script.array.array3d) package.

For N-dimensional arrays, check out the new [xarray-grass](https://github.com/lrntct/xarray-grass) bridge developed by [Laurent Courty](https://github.com/lrntct) {{< fa rocket >}}
:::
Expand Down Expand Up @@ -287,7 +287,7 @@ elevation_3dmap.show()

![Resulting elevation with streams in 3D](elevation_3d.webp)

And now let's augment it with [Nano Banana AI](https://nanobanana.ai/):
You can take it a step further and make the rendering more realistic with an AI image model such as Nano Banana:

![AI-enhanced landscape rendering for visual realism](thumbnail.webp)

Expand Down
2 changes: 1 addition & 1 deletion content/tutorials/viewshed/visibility_analysis.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ tutorial. Every step also works from the GRASS GUI or command line; use the tool
The towers are real places, so rather than use a prepackaged sample dataset we
download the terrain around them from the USGS. We create a new GRASS project in UTM
zone 17N (EPSG:32617) with
[create_project](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.core.create_project),
[create_project](https://grass.osgeo.org/grass-stable/manuals/libpython/grass.script.html#grass.script.create_project),
then fetch 1 arc-second (about 30 m) elevation from the USGS National Map with
[r.in.usgs](https://grass.osgeo.org/grass-stable/manuals/addons/r.in.usgs.html), an
add-on installed with
Expand Down
Loading