self_union()would fail due to a change in the
shortcut_functioncolumn is now logical, uses better column names, and has a custom print function that gives more information. (#34)
municipalities(). This function combines Regional Districts with the Northern Rockies Regional Municipalites to create a full provincial layer of ‘Regional-District-like’ polygons.
bec(and other large downloadable layers) show up in the output of
get_layer("bec")works so that getting downloadable datasets is indistinguishable from getting local datasets. (#32)
sffunctions that have been moved to the
lwgeompackage. They now use the
lwgeomfunction (Fixes CRAN CHECK NOTE; #33).
bc_cities()which is a point layer of B.C.’s major cities.
raster_by_polyto overlay a SpatialPolygonsDataFrmae or sf polygons layer on a raster layer and clip the raster to each polygon, and
summarize_raster_listto summarize the results of
get_layer()now only accepts characters (#31)
check_write_to_data_dirwhere it was not creating data directory
bec(), which uses the new function
bec_colors()) to generate a vector of colours that match the standard colours used to colour Biogeoclimatic Zone maps.
getNamespaceExports("bcmaps")so that you can call layers without loading the package via
watershedslayer from package
This is a major new release with breaking changes.
All data has been removed from the
bcmaps package and moved to the
bcmaps.rdata package, which is hosted on the bcgov drat repository: https://github.com/bcgov/drat. That package must be installed in order for
bcmaps to access the data. It can be installed with:
In previous versions of
bcmaps, data was stored in the package and loaded by calling
data("layername") or simply
Now loading data requires a function call - either using a shortcut function that is the same name as the dataset (e.g.,
bc_bound() whereas previously one would simply use
bc_bound). Alternatively, one can use the
get_layer() function (e.g.,
Another major change is that all the layers are now returned as
sf classes by default, rather than
Spatial versions of the data can still be obtained by setting the
class argument to
get_layer() and the shortcut functions (E.g.,
bc_bound(class = "sp") or
get_layer("bc_bound", class = "sp")).
fix_geo_problemsfunction to set the maximum number of iterations it should go through in attempting to repair topological issues.
watercourses_5Mdatasets to UTF-8.
transform_bc_albersare Generic functions with methods for
sfobjects as well as
fix_self_intersectis now defunct
fix_self_intersecthas been renamed to
fix_geo_problems(but kept as an alias for now)
fix_geo_problemscan often also fix orphaned holes in addition to self-intersections.
watershedsdataset (#15, @markjohnsonubc)
NEWS.mdfile to track changes to the package.
Added two new functions to create and work with SpatailPolygonsDataFrames with nested data frames:
self_unionperforms a union on a single
SpatialPolygons*object to take into account overlaps. Polygon attributes are combined in a nested dataframe.
get_poly_attributeallows you to easily parse a nested data frame column (created by
self_union) to extract or calculate the attributes you want
Added a couple of convenience functions:
transform_bc_albers()transforms a Spatial object to BC Albers projection
fix_self_intersect()checks for and repairs self-intersecting polygons
Added 3 Natural Resource layers (areas, regions and districts)
Added high resolution BC boundaries (