Data structures for vector layers in R
Spatial vector layers have two components: the geometry and the attribute table. The geometry component holds the spatial coordinates and information regarding their arrangement in separate features, while the attribute table holds additional information regarding each feature. For example, in a point layer of capital cities, the record for London may be composed of a geometric component (a point coordinate, such as 51.5072°N, 0.1275°W) and a row in an attribute table holding additional data regarding each city (for example, population size, built area, and so on).
The geometry part in a vector layer is obligatory and there are three types of geometries: points, lines, and polygons. The attribute table is optional. Classes for the six spatial vector layers types, constituting all possible combinations of these two properties, have been defined in the sp
package. They are summarized in the following table:
Geometry type |
Attribute table |
Class... |
---|