All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
osm and aoi modules
was increased.rcrisp is meant to solve in contrast with alternative
approaches.reproject() yields
equivalent results regardless of whether input data are curvilinear
(WGS84) or rectilinear (projected).preprocess_distance() function. This function returns a
plain numeric in meters, regardless of whether the input is provided as
a units object, a plain numeric or another vector-like
class with numeric storage.mode.geom_delineation() was added as a
ggplot2-based alternative to the plot()
method, returning a list of geom_sf() layers that can be
added to a ggplot object with +.print() and summary() methods were added
for delineation objects. print() gives a
compact overview of present layers and their feature counts.
summary() additionally reports areas (sqkm) for delineation
layers and lengths (km) for river_centerline.plot() method was created for objects of class
delineation.get_river_aoi(), delineate_corridor(), and
delineate() when lat/lon input is reprojected for
buffering, and in delineate() when no CRS is provided and a
UTM zone is auto-selected.delineate_corridor(),
delineate_segments(), and
delineate_riverspace() to verify that geographic (lat/lon)
CRS input raises an informative error.delineate() now errors early when fewer than two river
crossings are found.inst/joss/, along with a GitHub Actions workflow to build a
draft PDF.get_osm_streets(). CRS input is now checked in
as_crs() as in the other get_osm_*()
functions.check_cache().knitr::knit() are reinserted into the vignettes. Affected
vignettes were also recompiled.dem_source in get_dem() was made
case insensitive.reproject(): the
crs parameter no longer (incorrectly) lists
logical as an accepted type. crs accepts
numeric/integer, character (e.g. “EPSG:4326”) or an sf::crs
object; passing TRUE/FALSE will fail.knitr::knit() are reinserted into the vignettes. Affected
vignettes were also recompiled.clear_cache() and
delineate() were made factually consistent with the
code.delineate_city_river() instead of the old
delineate(city_name, river_name, ...) call.delineate_city_river() instead of the old
delineate(city_name, river_name, ...) call, and to reflect
the current corridor_init parameter (replacing the old
method argument). The description of the return value was
updated to mention the delineation S3 class and its full
set of layers.delineate(), to reference
delineate_city_river(), and to remove an unused
get_dem_example_data() call from the setup chunk.stop(), warning(), and
message() calls have been migrated to cli
equivalents (cli_abort(), cli_warn(),
cli_inform()) for consistent output.aoi_buildings availability check in
delineate() was moved earlier to fail before any
computation begins.define_aoi().check_cache() was moved behind
interactive().get_osmdata() was renamed to get_osm() and
all other uses of osmdata and osm_data in
object and function names have been consistently renamed to
osm throughout the package to avoid confusions with the
osmdata package.delineate() was refactored into four
composable functions to reduce parameter complexity and improve
step-by-step control:
define_aoi() (new): defines the area of interest and
all delineation parameters (CRS, buffer sizes, corridor initialisation
method) from a city and river name.get_osmdata() and get_dem() was adapted to
accept an aoi object returned by define_aoi()
instead of individual parameters.delineate(): now accepts the aoi object,
OSM data, and DEM as separate inputs, with a reduced parameter
signature.delineate_city_river() (new): convenience wrapper that
runs the full workflow from city and river name with default
parameters.delineate() returns now an S3 object of class
delineation.as_network() now checks for NAs in non-geometry columns
and issues an error, proceeds with a warning, imputes NA values, or
ignores them, as specified by the user with a new na_action
parameter.autotest test is now skipped when the
autotest package is not installed, and
autotest is declared in Suggests together with
its Additional_repositories source, resolving a check
warning on CRAN.match_osm_name() are returned before
partial matches.get_osm_buildings() does not error when given bounding
box as input.checkmate package were added to
input parameters throughout the package.bucharest_dambovita example package data.get_osm_example_data() and
get_dem_example_data() fail gracefully in examples,
vignettes and tests, that is, return a message and NULL, if internet
resource is not available.sapply() with vapply() throughout
the package for improved type safety.DESCRIPTION and
codemeta.jsondem_to_ceg() function was removed from the package
as it is not used.check_cache() is only run when the package is attached,
not when it is loaded to avoid namespace issues.tools::R_user_dir(). Checks for the cache directory size
and outdated files are now included on package load.test-delineate.R and
test-osmdata.R have been partly rewritten, so that they use
less resources and they complete in a reasonable amount of time.