Skip to content

Commit

Permalink
adding citations
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldorman committed Oct 9, 2023
1 parent 0b5513a commit 930a1e6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion 01-spatial-data.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ In a local datum, shown as a purple dashed line, the ellipsoidal surface is shif
These allow local variations on Earth's surface, such as large mountain ranges, to be accounted for in a local CRS.
This can be seen in @fig-geocentric-vs-local, where the local datum is fitted to the area of Philippines, but is misaligned with most of the rest of the planet's surface. Both datums in @fig-geocentric-vs-local are put on top of a geoid---a model of global mean sea level.

![Geocentric and local geodetic datums shown on top of a geoid (in false color and the vertical exaggeration by 10,000 scale factor). Image of the geoid is adapted from the work of Ince et al. (2019). (add citation...)](https://r.geocompx.org/figures/02_datum_fig.png){#fig-geocentric-vs-local}
![Geocentric and local geodetic datums shown on top of a geoid (in false color and the vertical exaggeration by 10,000 scale factor). Image of the geoid is adapted from the work of [@essd-11-647-2019].](https://r.geocompx.org/figures/02_datum_fig.png){#fig-geocentric-vs-local}

### Projected coordinate reference systems {#sec-projected-coordinate-reference-systems}

Expand Down
2 changes: 1 addition & 1 deletion 02-attribute-operations.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ world_agg4

Combining data from different sources is a common task in data preparation. Joins do this by combining tables based on a shared "key" variable.
**pandas** has a function named `pd.merge` for joining `(Geo)DataFrames` based on common column(s).
The `pd.merge` function follows conventions used in the database language SQL (Grolemund and Wickham 2016, add citation...).
The `pd.merge` function follows conventions used in the database language SQL [@grolemund_r_2016].
The `pd.merge` function works the same on `DataFrame` and `GeoDataFrame` objects.
The result of `pd.merge` can be either a `DataFrame` or a `GeoDataFrame` object, depending on the inputs.

Expand Down
16 changes: 7 additions & 9 deletions 03-spatial-operations.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,14 @@ The next section further explores different types of spatial relation, also know

### Topological relations {#sec-topological-relations}

<!--toDo: references should be fixed-->
Topological relations describe the spatial relationships between objects.
"Binary topological relationships", to give them their full name, are logical statements (in that the answer can only be `True` or `False`) about the spatial relationships between two objects defined by ordered sets of points (typically forming points, lines and polygons) in two or more dimensions (Egenhofer and Herring 1990, to add citation...).
That may sound rather abstract and, indeed, the definition and classification of topological relations is based on mathematical foundations first published in book form in 1966 (Spanier 1995, to add citation...), with the field of algebraic topology continuing into the 21st century (Dieck 2008, to add citation...).
"Binary topological relationships", to give them their full name, are logical statements (in that the answer can only be `True` or `False`) about the spatial relationships between two objects defined by ordered sets of points (typically forming points, lines and polygons) in two or more dimensions [@egenhofer_mathematical_1990].
That may sound rather abstract and, indeed, the definition and classification of topological relations is based on mathematical foundations first published in book form in 1966 [@spanier_algebraic_1995], with the field of algebraic topology continuing into the 21st century [@dieck_algebraic_2008].

Despite their mathematical origins, topological relations can be understood intuitively with reference to visualizations of commonly used functions that test for common types of spatial relationships.
<!--toDo: update references to figures-->
@fig-spatial-relations shows a variety of geometry pairs and their associated relations.
The third and fourth pairs in @fig-spatial-relations (from left to right and then down) demonstrate that, for some relations, order is important: while the relations equals, intersects, crosses, touches and overlaps are symmetrical, meaning that if `x.relation(y)` is true, `y.relation(x)` will also be true, relations in which the order of the geometries are important such as contains and within are not.
Notice that each geometry pair has a ["DE-9IM"](https://en.wikipedia.org/wiki/DE-9IM) string such as FF2F11212. DE-9IM strings describe the dimensionality (0=points, 1=lines, 2=polygons) of the pairwise intersections of the interior, boundary, and exterior, of two geometries (i.e., nine values of 0/1/2 encoded into a string). This is an advanced topic beyond the scope of this book, which can be useful to understand the difference between relation types, or define custom types of relations. See the [DE-9IM strings](https://r.geocompx.org/spatial-operations#de-9im-strings) section in Geocomputation with R (add citation...).
Notice that each geometry pair has a ["DE-9IM"](https://en.wikipedia.org/wiki/DE-9IM) string such as FF2F11212. DE-9IM strings describe the dimensionality (0=points, 1=lines, 2=polygons) of the pairwise intersections of the interior, boundary, and exterior, of two geometries (i.e., nine values of 0/1/2 encoded into a string). This is an advanced topic beyond the scope of this book, which can be useful to understand the difference between relation types, or define custom types of relations. See the [DE-9IM strings](https://r.geocompx.org/spatial-operations#de-9im-strings) section in Geocomputation with R [@lovelace_geocomputation_2019].

![Topological relations between vector geometries, inspired by Figures 1 and 2 in Egenhofer and Herring (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.
Expand Down Expand Up @@ -519,9 +517,9 @@ Spatial congruence is an important concept related to spatial aggregation.
An aggregating object (which we will refer to as `y`) is congruent with the target object (`x`) if the two objects have shared borders.
Often this is the case for administrative boundary data, whereby larger units---such as Middle Layer Super Output Areas (MSOAs) in the UK, or districts in many other European countries---are composed of many smaller units.

Incongruent aggregating objects, by contrast, do not share common borders with the target (Qiu, Zhang, and Zhou 2012, to add citation...).
Incongruent aggregating objects, by contrast, do not share common borders with the target [@qiu_development_2012].
This is problematic for spatial aggregation (and other spatial operations) illustrated in @fig-nz-and-grid: aggregating the centroid of each sub-zone will not return accurate results.
Areal interpolation overcomes this issue by transferring values from one set of areal units to another, using a range of algorithms including simple area weighted approaches and more sophisticated approaches such as 'pycnophylactic' methods (Tobler 1979, to add citation...).
Areal interpolation overcomes this issue by transferring values from one set of areal units to another, using a range of algorithms including simple area weighted approaches and more sophisticated approaches such as 'pycnophylactic' methods [@tobler_smooth_1979].

To demonstrate, we will create a "synthetic" layer comprising a [regular grid](https://gis.stackexchange.com/questions/322589/rasterizing-polygon-grid-in-python-geopandas-rasterio) of rectangles of size $100\times100$ $km$, covering the extent of the `nz` layer:

Expand Down Expand Up @@ -804,7 +802,7 @@ These operations are in fact Boolean local operations, since we compare, cell-wi

### Map algebra {#sec-map-algebra}

The term 'map algebra' was coined in the late 1970s to describe a "set of conventions, capabilities, and techniques" for the analysis of geographic raster and (although less prominently) vector data (Tomlin 1994, to add citation...).
The term 'map algebra' was coined in the late 1970s to describe a "set of conventions, capabilities, and techniques" for the analysis of geographic raster and (although less prominently) vector data [@tomlin_map_1994].
In this context, we define map algebra more narrowly, as operations that modify or summarise raster cell values, with reference to surrounding cells, zones, or statistical functions that apply to every cell.

Map algebra operations tend to be fast, because raster datasets only implicitly store coordinates, hence the old adage "raster is faster but vector is corrector".
Expand All @@ -814,7 +812,7 @@ Additionally, if two or more raster datasets share the same extent, projection a

<!-- This is the way that map algebra works with the terra package. First, the headers of the raster datasets are queried and (in cases where map algebra operations work on more than one dataset) checked to ensure the datasets are compatible. Second, map algebra retains the so-called one-to-one locational correspondence, meaning that cells cannot move. This differs from matrix algebra, in which values change position, for example when multiplying or dividing matrices. -->

Map algebra (or cartographic modeling with raster data) divides raster operations into four subclasses (Tomlin 1990, to add citation...), with each working on one or several grids simultaneously:
Map algebra (or cartographic modeling with raster data) divides raster operations into four subclasses [@tomlin_geographic_1990], with each working on one or several grids simultaneously:

* Local or per-cell operations (@sec-raster-local-operations)
* Focal or neighborhood operations. Most often the output cell value is the result of a $3 \times 3$ input cell block (@sec-focal-operations)
Expand Down

0 comments on commit 930a1e6

Please sign in to comment.