Book Image

Learning R for Geospatial Analysis

By : Michael Dorman
Book Image

Learning R for Geospatial Analysis

By: Michael Dorman

Overview of this book

Table of Contents (18 chapters)
Learning R for Geospatial Analysis
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
External Datasets Used in Examples
Cited References
Index

Geometrical calculations on vector layers


In previous sections, we covered the querying of the immediately available properties of vector layers (for example, the CRS definition or attribute table), and the modification of vector layers involving only the attribute table component (for example, removing the attribute table or subsetting the layer according to it). In the next two sections, you will learn to examine and modify the geometrical component of vector layers. In this section, operations involving a single vector layer, such as reprojection and area calculation, will be covered. In the next section, we will deal with operations involving pairs of vector layers.

Reprojecting vector layers

Reprojection is the conversion of all the coordinates of a spatial object from one CRS to another. Note the distinction when specifying a CRS (which we previously did with airports), where only the CRS definition associated with the layer is modified, leaving the coordinates unaltered. The reprojection...