Skip to content

Commit 70fd0a8

Browse files
committed
Fixing grammer/typos in geopandas chapter
1 parent a895d07 commit 70fd0a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sections/geopandas.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ coord_box_df = gpd.GeoDataFrame(
197197
geometry = [coord_box]).to_crs(ships_meta["crs"])
198198
```
199199

200-
Now, we can read in raster again cropped to bounding box. We use the `mask` function from `rasterio.mask`. Note that we apply this to the connection to the raster file (`with rasterio.open(...)`), then update the metadata associated with the raster, because the `mask` function requires as its first `dataset` argument a dataset object opened in `r` mode.
200+
Now, we can read in the raster again, but cropped to bounding box. We use the `mask` function from `rasterio.mask`. Note that we apply this to the connection to the raster file (`with rasterio.open(...)`), then update the metadata associated with the raster, because the `mask` function requires as its first `dataset` argument a dataset object opened in `r` mode.
201201

202202

203203
```{python}
@@ -224,7 +224,7 @@ shipc_meta.update({"driver": "GTiff",
224224
"compress": "lzw"})
225225
```
226226

227-
Now we'll do a similar task with the vector data. Tin this case, we use a spatial join. The join will be an inner join, and select only rows from the left side (our fishing districts) that are **within** the right side (our bounding box). I chose this method as opposed to a clipping type operation because it ensures that we don't end up with any open polygons at the boundaries of our box, which could cause problems for us down the road.
227+
Now we'll do a similar task with the vector data. In this case, we use a spatial join. The join will be an inner join, and select only rows from the left side (our fishing districts) that are **within** the right side (our bounding box). I chose this method as opposed to a clipping type operation because it ensures that we don't end up with any open polygons at the boundaries of our box, which could cause problems for us down the road.
228228

229229
```{python}
230230
comm_clip = gpd.sjoin(comm_3338,

0 commit comments

Comments
 (0)