bcmaps 2.2.1
- In the
cded_()functions, theaskargument, which controls if the user is asked to store data in the cache, was ignored. It is now respected (#147). -
utm_convert()now respectstibbleclasses (#143, #148). - Fixed a bug in
utm_convert()where new coordinates could be mismatched with the wrong rows from the input data frame. (#146, #148)
bcmaps 2.2.0
CRAN release: 2024-01-24
- Added function
utm_convert()to convert tabular data with X and Y coordinates in (possibly multiple) UTM zones to a single CRS.
bcmaps 2.1.0
CRAN release: 2023-10-17
- Added function
cded_terra() - Deprecated function
cded_raster()- this will be removed in a future version.
bcmaps 2.0.0
CRAN release: 2023-08-23
Removal of sp and raster support
We’ve removed support for the sp and raster packages, especially those parts that require the use of the rgdal and rgeos packages, which will be retired in October 2023. See the r-spatial blog for details of this evolution.
- Removed the
classargument in all of the data download functions:get_layer()and all of the wrapper shortcuts such asbc_bound(),census_tract(), etc. These functions will now only returnsfobjects. - The
Spatialmethod oftransform_bc_albers()is removed. -
fix_geo_problems()is removed. Forsfobjects simply usesf::st_make_valid() -
self_union()is removed. Useraster::union()forSpatialPolygonsDataFrames, orsf::st_union()withsfobjects instead. -
get_poly_attribute()is removed. -
raster_by_poly()is retained for now as it does not rely onrgdalorrgeos, justspandraster, which are still being maintained.
Documentation improvements
- Added a
pkgdownsite forbcmapshttps://bcgov.github.io/bcmaps/ (#63) - Moved the detailed user documentation from the
READMEto a Get Started withbcmapsarticle/vignette (#42) - Better documentation for
bc_bound_hres()(#124)
bcmaps 1.2.0
CRAN release: 2023-04-11
Deprecation of sp and raster support
We’ve started the process of removing support for the sp and raster packages, especially those parts of that require the use of the rgdal and rgeos packages, which will be retired in October 2023. See the r-spatial blog for details of this evolution. We will fully remove support for Spatial classes (from package sp) in the next release in Summer 2023.
- Added deprecation warnings for the
classargument in all of the data download functions:get_layer()and all of the wrapper shortcuts such asbc_bound(),census_tract(), etc. This argument will be removed in the next version ofbcmapsas these functions will only returnsfobjects. - The
Spatialmethod oftransform_bc_albers()is deprecated. -
fix_geo_problems()is deprecated and will be removed completely in Summer
- For
sfobjects simply usesf::st_make_valid()
-
self_union()is deprecated and will be removed in Summer 2023. Useraster::union()forSpatialPolygonsDataFrames, orsf::st_union()withsfobjects instead. -
get_poly_attribute()is deprecated because it had a very niche application for calculating attributes on aSpatialPolygonsDataFrame, which we are removing support for. It will be removed completely in Summer 2023.
bcmaps 1.1.0
CRAN release: 2023-01-06
-
becandtsalayers are now downloaded directly from the BC Data Catalogue. This ensures that these are up-to-date and means that we do not rely on the manual updating of these layers at https://github.com/bcgov/bcmapsdata. (#62, #115) - Package startup message about no longer needing the
bcmapsdatapackage has been removed.
bcmaps 1.0.3
CRAN release: 2022-08-26
- New behaviour of shortcut functions ensures that all spatial objects (
sforSpatial) returned are topologically valid and in the standard CRS of “EPSG:3005” (BC Albers). #96 - More robust behaviour of getting and checking cache of
cdedfiles.
bcmaps 1.0.2
CRAN release: 2021-03-09
- New helper function
show_cached_files()to show the files that you have cached (and how much space they’re taking up on your computer). (#92, #93)
bcmaps 1.0.1
CRAN release: 2021-01-19
- When R version is >= 4.0, bcmaps will use
tools::R_user_dir("bcmaps", "cache")to determine the cache directory, while when R version is < 4.0, it will userappdirs::user_cache_dir("bcmaps"). This is to align with CRAN’s storage policy using thetoolsapproach while maintaining backwards compatibility with older R versions. Unfortunately this will require users who updated to version 1.0 to re-download layers because we are caching layers in a different location on your file system from that version. Users wishing to clear the old cache location could runbcmaps::delete_cache()before updating to bcmaps 1.0.1. (#83) -
cded_rasterandcded_starsdirectly accepts a bounding box generated bysf::st_bboxas an aoi. (#87) - Fixed a bug where bundled datasets (e.g.,
mapsheets_50K(),mapsheets_250K()) would not work ifsfwas linked to older GDAL/PROJ libraries due to different formats of coordinate reference systems. (#85) - Added new census boundary layers:
census_dissemination_area(),census_metropolitan_area(),census_tract()(#82). - Add missing layers to
available_layers
bcmaps 1.0
- Drop dependency on {bcmapsdata} in favour of directly retrieving layers (where present) from the B.C. Data Catalogue (via {bcdata}) and storing in a local cache. Some additional layers are retrieved from Statistics Canada.
- Some layers may not be identical to what was previously in {bcmaps}. For example
bc_neighbourspreviously used data from Natural Earth. The availability of a Hi-Res B.C. boundaries over WFS from the B.C. Data Catalogue means that the layer can now be created directly by {bcmaps}. - Added forward sortation area (
fsa), health boundaries (health_*) and some census boundaries (census_*). - Added ability to retrieve and cache CDED (BC Digital Elevation Model data, returning either
starsorrasterobjects (#73) - Use of parallelism in functions that allow it (
raster_by_poly()&summarize_raster_list()) is now reliant on users setting up their ownfuture::plan()to specify strategy and number of workers, rather than setting defaults (this is the best practice according to the author of the future package @HenrikBengtsson, #69) - Fixed bug where errors would occur if a user’s system GEOS was a development version (e.g., 3.9.0dev; #71)
bcmaps 0.18.1
CRAN release: 2020-04-29
- Fixed an error where
fix_geo_problems()would fail depending on the version ofGEOSupon whichsfwas built. -
raster_by_poly()fails informatively when there areNAvalues in the column on which the polygons are to be split (#48, thanks @j-galloway) -
raster_by_poly()(andsummarize_raster_list()) now uses thefuture.applypackage for parallelism, enabling easy parallelization across platforms (#49) -
get_layer()(and in turn, any of the individual layer functions) now sets thecrsso thecrsrepresentation will always be up to date with the user’ssfversion (#51, https://github.com/r-spatial/sf/issues/1225)
bcmaps 0.18.0
CRAN release: 2019-02-15
- Added
bc_neighbours()function to call layers containing adjacent jurisdictions. - Ensured the
geometrycolumn in all layers is consistently named"geometry"(Thanks @boshek) - Moving sf package to Depends to take advantage of sf print methods.
- Added
bc_bbox()to get a bounding box for British Columbia (#40). - All references to external data package now point to
bcmapsdatabecause of this R bug (https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17520)
bcmaps v0.17.1
CRAN release: 2018-03-14
- Fixed an issue where
self_union()would fail due to a change in therasterpackage (30cef3438)
bcmaps 0.17.0
CRAN release: 2018-01-18
- Output of
available_layers()has changed:shortcut_functioncolumn is now logical, uses better column names, and has a custom print function that gives more information. (#34) - Add links to
combine_nr_rd()function fromregional_districts()andmunicipalities(). This function combines Regional Districts with the Northern Rockies Regional Municipalities to create a full provincial layer of ‘Regional-District-like’ polygons. - Added Timber Supply Areas and BC cities shortcut function and to
available_layers() -
bec(and other large downloadable layers) show up in the output ofavailable_layers(),bec()works, andget_layer("bec")works so that getting downloadable datasets is indistinguishable from getting local datasets. (#32) - Some utility functions use
sffunctions that have been moved to thelwgeompackage. They now use thelwgeomfunction (Fixes CRAN CHECK NOTE; #33). - Added new layer:
bc_cities()which is a point layer of B.C.’s major cities.
bcmaps 0.16.0
CRAN release: 2017-12-20
- First release to CRAN
- Added two new functions:
raster_by_polyto overlay a SpatialPolygonsDataFrmae or sf polygons layer on a raster layer and clip the raster to each polygon, andsummarize_raster_listto summarize the results ofraster_to_poly
bcmaps 0.15.1
-
get_layer()now only accepts characters (#31) - Fixes bug in
check_write_to_data_dirwhere it was not creating data directory - Update README installation instructions so that vignettes aren’t built before bcmaps.rdata is installed (#29)
bcmaps 0.15.0
- Added the ability to download Biogeoclimatic Zone map - as it was too big to fit in the bcmaps.rdata package, it is hosted as an asset on a GitHub release of bcmaps.rdata, and downloaded via the function
bec(), which uses the new functionget_big_data()(#28). - Added function
bec_colours()(and aliasbec_colors()) to generate a vector of colours that match the standard colours used to colour Biogeoclimatic Zone maps.
bcmaps 0.14.0
- Changed the lookup for exported objected to
getNamespaceExports("bcmaps")so that you can call layers without loading the package viabcmaps:: - Removed
watershedslayer from package - Added
ecosectionsto package
bcmaps 0.13.0
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: install.packages('bcmaps.rdata', repos='https://bcgov.github.io/drat/')
In previous versions of bcmaps, data was stored in the package and loaded by calling data("layername") or simply layername (e.g., data("bc_bound") or bc_bound).
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., get_layer("bc_bound")).
Another major change is that all the layers are now returned as sf classes by default, rather than Spatial classes. Spatial versions of the data can still be obtained by setting the class argument to "sp" in get_layer() and the shortcut functions (E.g., bc_bound(class = "sp") or get_layer("bc_bound", class = "sp")).
bcmaps 0.10.1
- Fixed ring self-intersections in
bc_bound_hresandairzones(#13)
bcmaps 0.8.2
- Added a
triesargument tofix_geo_problemsfunction to set the maximum number of iterations it should go through in attempting to repair topological issues.
bcmaps 0.7.1
-
fix_geo_problemsandtransform_bc_albersare Generic functions with methods forsfobjects as well asSpatialobjects -
fix_self_intersectis now defunct
bcmaps 0.6.2
-
fix_self_intersecthas been renamed tofix_geo_problems(but kept as an alias for now) -
fix_geo_problemscan often also fix orphaned holes in addition to self-intersections.
bcmaps 0.6.0
- Added
watershedsdataset (#15, @markjohnsonubc) - Added a
NEWS.mdfile to track changes to the package.
bcmaps 0.5.0
Added two new functions to create and work with SpatailPolygonsDataFrames with nested data frames:
-
self_unionperforms a union on a singleSpatialPolygons*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 byself_union) to extract or calculate the attributes you want
bcmaps 0.4.0
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
