The [ operator in base R, for example, works equally for subsetting objects based on their attribute and spatial objects you can also join attributes in two geographic datasets using spatial joins. Sections 3.2.4 and 3.2.5 demonstrate how to join data onto simple feature objects using a shared ID and how to create new variables, respectively.Įach of these operations has a spatial equivalent: This teaches how to manipulate geographic objects based on attributes such as the names of bus stops in a vector dataset and elevations of pixels in a raster dataset.įor vector data, this means techniques such as subsetting and aggregation (see Sections 3.2.1 and 3.2.3). The header is a vital component of raster datasets which specifies how pixels relate to geographic coordinates (see also Chapter 4). The raster’s resolution defines the distance for each x- and y-step which is specified in a header. Its spatial location is defined by its index in the matrix: move from the origin four cells in the x direction (typically east and right on maps) and three cells in the y direction (typically south and down). To illustrate the point, think of a pixel in the 3 rd row and the 4 th column of a raster matrix. Unlike the vector data model, the raster data model stores the coordinate of the grid cell indirectly, meaning the distinction between attribute and spatial information is less clear. The Elephant & Castle / New Kent Road stop in London, for example has coordinates of -0.098 degrees longitude and 51.495 degrees latitude which can be represented as POINT (-0.098 51.495) in the sfc representation described in Chapter 2.Īttributes such as the name attribute of the POINT feature (to use Simple Features terminology) are the topic of this chapter.Īnother example is the elevation value (attribute) for a specific grid cell in raster data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |