documentation: "sf" refers to "simple features", not "shapefile"
wStockhausen opened this issue · 0 comments
The project uses GIS-related objects from both the "sp" and "sf" packages. The "sf"-related dataframes are frequently referred to as "shapefiles", which is misleading and incorrect. "sf" refers to "simple features" which, as I understand it, means that the geometric features (polygons, lines, points, etc.) the "sf" package deals with are non-hierarchical ("flat"), such that one feature does not contain others (in a hierarchical sense). This is also true of shapefiles, but sf dataframes are more general in that they can have multiple geometry columns (one for polygons, one for lines, one for points, eg.) whereas a shape file dataset only has one geometry column.
For users who are developing their own scripts from ACLIM2 versions (most of us, I imagine), it would be helpful if the ACLIM2 code used package scoping when calling functions, so it is more obvious in which package a particular function resides (e.g., sf::st_cast(...)). It may also reduce conflicts where two packages have functions with the same name, so one hides the other (depending on which was loaded last) if the package scoping is not used.
NB: I think the "sp" package allows for hierarchical features. The biggest advantage to using "sf" vs. "sp" objects is that "sf" datasets are dataframes (with at least one column of geometries) and can thus be easily manipulated using many tidyverse functions (particularly dplyr functions) whereas "sp" objects are much more complicated to manipulate (they are S3 (S4?) classes).