Recent Releases of grainscape
grainscape - v1.0.0
grainscape 1.0.0
Dependency changes
- Migrated from
raster/sptoterra/sffor all spatial operations:terraandsfadded toImports;rasterandspdependencies removed entirely.
- Vignette diagrams are now generated from code with
DiagrammeRsvgandrsvg(added to
Suggests);webshot2is no longer needed for the vignettes and was removed fromSuggests.
Breaking changes
MPG(),patchFilter(), andggGS()no longer acceptRasterLayerinputs;
passSpatRasterobjects (fromterra) instead;corridor(),distance(), andpoint()no longer acceptSpatialPointsinputs;
pass a two-column matrix orsfobject instead;- Slot types in
mpg,goc,grain, andcorridorS4 classes have changed from
RasterLayer/SpatialPoints/SpatialLines/SpatialLinesDataFrametoSpatRaster/sf; - The long-deprecated
gs-prefixed functions (gsMPG(),gsGOC(),gsGOCCorridor(),
gsGOCDistance(),gsGOCPoint(),gsGOCVisualize(),gsGraphDataFrame(),gsMPGstitch())
are now defunct and error with a pointer to their replacement (deprecated since 0.4.0; #10);
New features
- New exported plotting helpers
plotResistance()andplotWithResistance(): draw a
resistance surface with a consistent colour scheme (and a discrete-value legend), and
place it as an equally-sized reference panel beside a network plot for visual comparison.
Both are demonstrated in the vignette's introductory figures (plotWithResistance()uses
cowplot).
Bugfixes
- Fixed incorrect least-cost paths in MPG (#72);
- Fixed a regression in the #72 work where legitimate, non-redundant MPG links were dropped on
high-variance resistance surfaces: the indirect-path search could treat an unset cell id
(the internal-99sentinel) as a pivot patch, fabricating a bogus two-hop route that
suppressed a valid direct link. Such malformed links are now rejected and non-patch pivots
are ignored (#72); - Fixed patches being left isolated in the MPG: a patch cell that was never added as an
active cell during spreading (e.g. a single-cell patch) kept the internal-99id, so it
was an unresolved link endpoint and all of its links were silently dropped. Every cell's id
is now seeded from the voronoi map at initialization, so such patches are linked correctly
(#72); - Fixed an infinite loop (hang) in
MPG(): a resistance surface whose first cell isNAleft
the C++ engine's internal cost range asNaN, so every patch cell was assigned aNaN
resistance and never "settled", spinning forever. The engine now derives the cost range while
skippingNAcells, and fully initializes its spreading-state struct, hardening it against
this class of hang (#72); - Fixed a Voronoi tessellation bias on high-variance resistance surfaces: patch (source) cells
now begin spreading at the uniform minimum cost rather than the resistance of the cell they
happen to overlap. Previously a patch sitting on a high-resistance cell spread late and lost
territory to its neighbours, distorting the tessellation (and, in the extreme, leaving a
patch with a single-cell region and no links). The fix changes only the tessellation: link
weights are accumulated from the entered cells' resistances (independent of the source cell),
so on the package's test surfaces the MPG and its weights are unchanged, and still match
independent least-cost paths exactly (#72); - Fixed
graphdfreturning a transposed (single-column) data frame for MPGs with only one link; patchFilter()no longer errors on R < 4.6 (with recentterra): it masked small patches via
out[out %in% rmpatch] <- NA, which relies on%in%dispatching for aSpatRasterand fails
with "'match' requires vector arguments" under older R; it now usesterra::subst()(#76);point()(anddistance(), which calls it) now emit the "coords correspond to NA cells" warning once per call instead of once per coordinate-threshold combination (#50);- The
corridorplot()method now uses thelinewidthaesthetic (rather than the deprecated
sizeaesthetic) for its link segments, silencing aggplot2(>= 3.4.0) deprecation warning;
Vignette
- The "Calculating the minimum planar graph" vignette now generates its UML class diagrams, the
algorithm flow chart, and theEnginecall graphs directly from Graphviz/DiagrammeR
specifications (rendered to vector PDFs withDiagrammeRsvgandrsvg) rather than embedding
static images, so they stay in sync with the C++ engine; its technical reference was also
updated for the #72 least-cost-path changes (thesettled_map,createLinks(), and the
parentResistancefield) (#75); - Corrected the thresholded-MPG figure (Figure 6), which plotted links above the dispersal
threshold instead of the retained links below it (so the cheap, low-resistance links
between neighbouring patches were hidden); - Made the Euclidean-vs-resistance path-distance table robust by matching rows on the node
pair (rather than column-binding two independently sorted tables), and the "patch 7
neighbours" table now filters explicitly for patch 7. The minimum-planar-graph figure above
that table now labels exactly node 7 and its linked neighbours, derived from the graph rather
than a hard-coded list of patch ids.
Biosphere - Conservation and Restoration
- TeX
Published by achubaty about 2 months ago
grainscape - v0.5.0
grainscape 0.5.0
Dependency changes
- Require R 4.2 or higher (for native pipe and placeholder)
- Add
DiagrammeR,dplyr,webshot2andwithrto Suggests for use with vignettes and tests
Bugfixes
- Fixed documentation issues and 'memory not mapped' segfault errors on R-devel (#73)
- Improved handling of user-added attributes in exported objects (#71)
- Fixed partial match warnings
- Use replacements for deprecated
igraphfunctions
New features & enhancements
- Use native R pipe throughout instead of
magrittrpipe - Improved documentation
Biosphere - Conservation and Restoration
- TeX
Published by achubaty over 1 year ago
grainscape - v0.4.4
Known issues: https://github.com/achubaty/grainscape/issues
version 0.4.4
Dependency changes
- Removed retiring spatial packages
rgdalandrgeos(#68) - Use
sffor writing shapefiles.
Bugfixes
- Improved plotting of lattice MPGs (#51)
- Removed unused
eucPerimWeightfrom documentation (#56) - Improved error messaging for undefined thresholds in
GOC()(#57)
New features & enhancements
- None
Biosphere - Conservation and Restoration
- TeX
Published by achubaty over 3 years ago
grainscape - v0.4.3
Known issues: https://github.com/achubaty/grainscape/issues
version 0.4.3
Dependency changes
- none
Bugfixes
- none
New features & enhancements
- added MEE paper citation and updated package
DESCRIPTION&README.
Biosphere - Conservation and Restoration
- TeX
Published by achubaty almost 6 years ago
grainscape - v0.4.2
Known issues: https://github.com/achubaty/grainscape/issues
version 0.4.2
Dependency changes
- removed unused dependency
hunspellfrom Suggests
Bugfixes
- reduced package tarball size
New features & enhancements
- none
Biosphere - Conservation and Restoration
- TeX
Published by achubaty over 6 years ago
grainscape - v0.4.0
version 0.4.0
Dependency changes
- Requires R >= 3.5
- remove
rgeosdependency and deprecate use ofspargument to many functions (#38)
Bugfixes
- numerous bug fixes
New features & enhancements
- reimplement an algorithm to calculate the minimum planar graph using C++;
no longer relies on SELES binary and is now cross-platform. - use updated
igraphfunctions internally - updated vignette / tutorial (#5)
- renamed functions to remove
gsandgsGOCprefixes; old names have been deprecated and will be removed in a future release (#10) MPG()can now handle large rasters- use S4 classes and methods (#3, #19)
- improved plotting using
ggplot2by default (#22, #47) - new functions
export()(#39) andpatchFilter()(#40) - fix typos (#58, @jsta)
Removed features
- removed
gsMPGstitch()as it was unreliable
Biosphere - Conservation and Restoration
- TeX
Published by achubaty about 7 years ago