Skip to content

Commit

Permalink
corrections ch03
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldorman committed Oct 8, 2024
1 parent 50f56a6 commit 7bec59d
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 89 deletions.
4 changes: 2 additions & 2 deletions 03-spatial-operations.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Also note that the **shapely** package contains the `.relate` and `.relate_patte

[^de-9im]: [https://en.wikipedia.org/wiki/DE-9IM](https://en.wikipedia.org/wiki/DE-9IM)

![Topological relations between vector geometries, inspired by Figures 1 and 2 in [@egenhofer_mathematical_1990]. The relations for which the `x.relation(y)` is true are printed for each geometry pair, with `x` represented in pink and `y` represented in blue. The nature of the spatial relationship for each pair is described by the Dimensionally Extended 9-Intersection Model string.](images/relations-1.png){#fig-spatial-relations}
![Topological relations between vector geometries, inspired by Figures 1 and 2 in @egenhofer_mathematical_1990. The relations for which the `x.relation(y)` is true are printed for each geometry pair, with `x` represented in pink and `y` represented in blue. The nature of the spatial relationship for each pair is described by the Dimensionally Extended 9-Intersection Model string.](images/relations-1.png){#fig-spatial-relations}

In **shapely**, methods testing for different types of topological relations are known as 'relationships'.
**geopandas** provides their wrappers (with the same method name) which can be applied on multiple geometries at once (such as `.intersects` and `.disjoint` applied on all points in `nz_height`, see @sec-spatial-subsetting-vector).
Expand All @@ -244,7 +244,7 @@ poly = gpd.GeoSeries([
])
```

The sample dataset which we created is composed of three is `GeoSeries`: named `points`, `line`, and `poly`, which are visualized in @fig-spatial-relations-geoms.
The sample dataset which we created is composed of three `GeoSeries`: named `points`, `line`, and `poly`, which are visualized in @fig-spatial-relations-geoms.
The last expression is a `for` loop used to add text labels (`0`, `1`, and `2`) to identify the points; we are going to explain the concepts of text annotations with **geopandas** `.plot` in @sec-plot-static-labels.

```{python}
Expand Down
Loading

0 comments on commit 7bec59d

Please sign in to comment.