isonanax.blogg.se

Riobot grid mapping tutorial
Riobot grid mapping tutorial




Sf provides the same functionality (and more) previously provided in three packages - sp for data classes ( Pebesma and Bivand 2018), rgdal for data read/write via an interface to GDAL and PROJ ( Bivand, Keitt, and Rowlingson 2018) and rgeos for spatial operations via an interface to GEOS ( Bivand and Rundel 2018). Sf also supports geometry collections, which can contain multiple geometry types in a single object. Sf can represent all common vector geometry types (raster data classes are not supported by sf): points, lines, polygons and their respective ‘multi’ versions (which group together features of the same type into a single feature). There is more to CRSs, as described in Sections 2.4 and 7 but, for the purposes of this section, it is sufficient to know that coordinates consist of two numbers representing distance from an origin, usually in \(x\) then \(y\) dimensions.įIGURE 2.2: Simple feature types fully supported by sf. The location of National Grid’s origin, in the sea beyond South West Peninsular, ensures that most locations in the UK have positive Easting and Northing values. This can be verified visually: slightly more than 5 ‘boxes’ - square areas bounded by the gray grid lines 100 km in width - separate the point representing London from the origin (Figure 2.1, right panel). The same point could also be approximated in a projected CRS with ‘Easting/Northing’ values of c(530000, 180000) in the British National Grid, meaning that London is located 530 km East and 180 km North of the \(origin\) of the CRS. The origin in this case is at 0 degrees longitude (the Prime Meridian) and 0 degree latitude (the Equator) in a geographic (‘lon/lat’) CRS (Figure 2.1, left panel). This means that its location is -0.1 degrees east and 51.5 degrees north of the origin. In this system London, for example, can be represented by the coordinates c(-0.1, 51.5). Most point geometries contain only two dimensions (3-dimensional CRSs contain an additional \(z\) value, typically representing height above sea level). Points can represent self-standing features (e.g., the location of a bus stop) or they can be linked together to form more complex geometries such as lines and polygons. The geographic vector data model is based on points located within a coordinate reference system (CRS). Still, there is a link between the two: the spatial coordinates which are at the heart of the geographic vector data model can be represented in R using vector objects. The former is a data model, the latter is an R class just like ame and matrix. Geographic vector data and the vector class (note the monospace font) in R. Take care when using the word ‘vector’ as it can have two meanings in this book: This book uses sf and terra packages to work with vector data and raster datasets, respectively. Whether your work involves more use of vector or raster datasets, it is worth understanding the underlying data model before using them, as discussed in subsequent chapters. There is much overlap in some fields and raster and vector datasets can be used together:Įcologists and demographers, for example, commonly use both vector and raster data.įurthermore, it is possible to convert between the two forms (see Section 6).

  • Raster dominates many environmental sciences because of the reliance on remote sensing data.
  • Vector data tends to dominate the social sciences because human settlements tend to have discrete borders.
  • The answer likely depends on your domain of application: Rasters aggregate spatially specific features to a given resolution, meaning that they are consistent over space and scalable (many worldwide raster datasets are available). Raster datasets are the basis of background images used in web-mapping and have been a vital source of geographic data since the origins of aerial photography and satellite-based remote sensing devices. The raster data model divides the surface up into cells of constant size. These have discrete, well-defined borders, meaning that vector datasets usually have a high level of precision (but not necessarily accuracy as we will see in Section 2.5). The vector data model represents the world using points, lines and polygons. We will introduce the theory behind each data model and the disciplines in which they predominate, before demonstrating their implementation in R. This chapter will provide brief explanations of the fundamental geographic data models: vector and raster.






    Riobot grid mapping tutorial