Skip to content

Commit 5717242

Browse files
committed
address review
1 parent 2ec9978 commit 5717242

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed
7.01 KB
Loading

content/tutorials/windfetch/windfetch.qmd

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Estimating Wind Fetch"
33
author: "Anna Petrasova"
44
date: 2025-09-09
55
date-modified: today
6-
categories: [Python, advanced]
6+
categories: [Python, advanced, ecology, engineering]
77
description: >
88
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.
99
image: images/thumbnail.webp
@@ -41,7 +41,7 @@ We will:
4141
This approach demonstrates how to leverage new Python API features introduced
4242
in GRASS 8.5—specifically, the [Tools API](https://grass.osgeo.org/grass-devel/manuals/libpython/grass.tools.html#)
4343
and the [RegionManager](https://grass.osgeo.org/grass-devel/manuals/libpython/grass.script.html#grass.script.RegionManager)
44-
context managers.
44+
context manager.
4545

4646
::: {.callout-note title="How to run this tutorial?"}
4747

@@ -57,7 +57,7 @@ and [Get started with GRASS in Google Colab](../get_started/grass_gis_in_google_
5757

5858
Start with importing Python packages.
5959
To import the _grass_ package, you need to tell Python where the GRASS Python package is
60-
(can be skipped for some environment).
60+
(can be skipped for some environments).
6161

6262
```{python}
6363
# import standard Python packages
@@ -157,8 +157,9 @@ tools.g_region(n=152610, s=94020, w=811200, e=876330)
157157

158158
## Elevation data
159159

160-
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.
162163

163164
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.
164165

@@ -474,8 +475,7 @@ merged_df = merged_df.groupby(["x", "y"], as_index=False)["weighted_fetch"].sum(
474475

475476
Final step is visualizing the data in a web map.
476477

477-
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).
479479

480480
```{python}
481481
merged_df.to_csv("results.txt", index=False)
@@ -491,7 +491,6 @@ tools.v_out_ogr(
491491
)
492492
```
493493

494-
495494
We will use [folium](https://python-visualization.github.io/folium/) to create an interactive map.
496495
The darker colors represent higher fetch values.
497496

0 commit comments

Comments
 (0)