You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wind fetch — the distance wind blows across open water — is a key factor in wave generation and shoreline exposure. We will estimate it using GRASS r.windfetch addon.
9
9
image: images/thumbnail.webp
@@ -41,7 +41,7 @@ We will:
41
41
This approach demonstrates how to leverage new Python API features introduced
42
42
in GRASS 8.5—specifically, the [Tools API](https://grass.osgeo.org/grass-devel/manuals/libpython/grass.tools.html#)
43
43
and the [RegionManager](https://grass.osgeo.org/grass-devel/manuals/libpython/grass.script.html#grass.script.RegionManager)
44
-
context managers.
44
+
context manager.
45
45
46
46
::: {.callout-note title="How to run this tutorial?"}
47
47
@@ -57,7 +57,7 @@ and [Get started with GRASS in Google Colab](../get_started/grass_gis_in_google_
57
57
58
58
Start with importing Python packages.
59
59
To import the _grass_ package, you need to tell Python where the GRASS Python package is
One of the important inputs to r.windfetch is a binary raster representing land (1) and water (0). This raster can be easily derived from an elevation raster. Another option would be to download
161
-
vector coastline data and use it to create a land/water raster, however the coastline can be incomplete and it requires more complex processing to be able to rasterize it into the desired land/water raster.
160
+
One of the important inputs to r.windfetch is a binary raster representing land (1) and water (0).
161
+
If the land polygons are not readily available, or they are not detailed enough,
162
+
this raster can be easily derived from an elevation raster.
162
163
163
164
We install the [r.in.usgs](https://grass.osgeo.org/grass-devel/manuals/addons/r.in.usgs.html) addon, which provides convenient access to elevation data (USGS NED/3DEP) directly from within GRASS.
We will write the DataFrame to a text file and import them into a vector map.
478
-
Then we will export the vector map to GeoJSON, ensuring the CRS is set to EPSG:4326 (ensured by specifying the RFC7946 standard).
478
+
We will convert the DataFrame to GeoJSON in EPSG:4326. First, we will create a CSV text file from the DataFrame and convert it into a GRASS vector map. Then, we will convert the vector map to GeoJSON, ensuring the CRS is set to EPSG:4326 (ensured by specifying the RFC7946 standard).
479
479
480
480
```{python}
481
481
merged_df.to_csv("results.txt", index=False)
@@ -491,7 +491,6 @@ tools.v_out_ogr(
491
491
)
492
492
```
493
493
494
-
495
494
We will use [folium](https://python-visualization.github.io/folium/) to create an interactive map.
0 commit comments