Skip to content

Commit

Permalink
DE-9IM plot tweak, fix #717
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Jan 7, 2022
1 parent ea717d0 commit 791539c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 04-spatial-operations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ text(x = c(-0.5, 1.5), y = 1, labels = c("x", "y")) # add text
To demonstrate how DE-9IM strings work, let's take a look at the various ways that the first geometry pair in Figure \@ref(fig:relations) relate.
Figure \@ref(fig:de9imgg) illustrates the 9 intersection model (9IM) which shows the intersections between every combination of each object's interior, boundary and exterior: when each component of the first object `x` is arranged as columns and each component of `y` is arranged as rows, a facetted graphic is created with the intersections between each element highlighted.

```{r de9imgg, echo=FALSE, warning=FALSE, fig.cap="Illustration of how the Dimensionally Extended 9 Intersection Model (DE-9IM) works." }
```{r de9imgg, echo=FALSE, warning=FALSE, fig.cap="Illustration of how the Dimensionally Extended 9 Intersection Model (DE-9IM) works. Colors not in the legend represent the overlap between different components. The thick lines highlight 2 dimensional intesections, e.g. between the boundary of object x and the interior of object y, shown in the middle top facet." }
p1_2 = st_as_sf(c(p1, p3))
ii = st_as_sf(st_intersection(p1, p3))
ii$Object = "Intersection"
Expand All @@ -356,7 +356,7 @@ ii$domain_b = "Interior"
bi = st_sf(x = st_intersection(
st_cast(p1, "LINESTRING"),
st_difference(p3, st_buffer(st_cast(p3, "LINESTRING"), dist = 0.005))
st_difference(p3, st_buffer(st_cast(p3, "LINESTRING"), dist = 0.01))
))
bi = st_buffer(bi, dist = 0.01)
bi$Object = "Intersection"
Expand Down

0 comments on commit 791539c

Please sign in to comment.