Changelog
Source:NEWS.md
dggridR 4.1.1-4.1.7
-
Continuing fix for the Debian/Linux
dyn.load()segfault (address (nil), cause 'memory not mapped') seen only on the CRAN pretest box (R-devel built withgcc-16, libstdc++-16,-D_FORTIFY_SOURCE=3). The R Extensions manual (§5.6) is explicit that using C++ I/O in shared libraries loaded by R is best avoided: “Examples have been seen where merely loading a DLL that contained calls to C++ I/O upset R’s own C I/O.” Earlier releases eliminated#include <Rcpp.h>fromDgBase.h(used by ~100 translation units), disabledRCPP_USE_GLOBAL_ROSTREAM, and routeddgcout/dgcerrthroughRprintf/REprintfinstead ofRcpp::Rcout/Rcpp::Rcerr. That still left file-scopestatic Rcpp::Rostream<...> Rcout/Rcerrobjects in every TU that included<Rcpp.h>(Rcpp declares them insideRcpp/iostream/Rstreambuf.h). Theirstd::ostream(streambuf*)constructors run inside the dynamic loader before R has finished initialising the .so, and on this specific toolchain they trip a NULL dereference during libstdc++ locale init. 4.1.7 removes them from the .so entirely:- New
src/dggridR_overrides/Rcpp/iostream/Rstreambuf.hshadows the upstream Rcpp header viaPKG_CPPFLAGS = -IdggridR_overridesinsrc/Makevars. The override keeps theRcpp::Rstreambuf/Rcpp::Rostreamtemplate declarations thatRcpp/routines.hneeds to compile its inlineRcpp_cout_get()/Rcpp_cerr_get()callable lookups, but drops the two file-scopestatic Rostream<...>instances.nmon the resultingdggridR.soshows zeroRostream-related vtable, RTTI, or static instance symbols (down from a full set in 4.1.6). - Every header that included
<iostream>purely to obtainstd::ostream/std::endlforoperator<<declarations now includes<ostream>instead. This removes libstdc++’sstd::__ioinitstatic initialiser from those translation units, dropping yet another category of load-time iostream construction. - Retained mitigations from 4.1.6:
DgBase.cppis<Rcpp.h>-free (customRprintf-backedstd::streambuffordgcout/dgcerr);RcppExports.cppis<Rcpp.h>-free;copy_to_src/dglib.cppis<Rcpp.h>-free. OnlyRwrapper.cppandRwrapper.hstill include<Rcpp.h>(because they legitimately needRcpp::List,Rcpp::NumericVector, andRCPP_MODULE), and with the Rstreambuf override above they no longer drag anyRcpp::Rostreamstatic instances into the .so.
- New
-
Persisted the new patches in
update_from_upstream.shso they survive future syncs from the DGGRID submodule.After these changes
nm dggridR.soshows the minimum static-initialiser footprint compatible with Rcpp modules: a handful of__GLOBAL__sub_I_*functions from the DGGRID engine’s existingconst std::string/const DgDVec2D/const DgIcosaTri[]etc. file-scope initialisers (which have been in the upstream code for years and pose no load-time risk), and zeroRcpp::Rostream/Rcpp::Rstreambufsymbols anywhere in the .so. Fixed install warnings from signed/unsigned comparisons in
DgDiscRFSGrids.handDgZ3StringRF.cpp.Guarded MSVC-only
#pragma comment(lib, ...)insafileio.cto avoid GCC unknown pragma warnings.Fixed integer truncation warnings by replacing C
abs()withstd::abs()forlong longarguments in DGGRID headers.Added durable patch steps in
update_from_upstream.shso these fixes survive source regeneration.
dggridR 4.1.0
-
dgconstruct()gainsaperture = 7for ISEA7H / FULLER7H hexagonal grids. -
dgconstruct()gainsaperture_type = "MIXED43"withnum_aperture_4_resfor ISEA43H / FULLER43H mixed-aperture grids. -
dgconstruct()gainsorient = "RANDOM"for a uniformly random icosahedral orientation (reproducible viaset.seed()). - New
dgneighbors(dggs, cells)returns the adjacent cell IDs for each input cell (hexagonal grids only). - New
dgchildren(dggs, cells)returns the child cell IDs at the next finer resolution. - New
dgparent(dggs, cells)returns the parent cell ID at the next coarser resolution. - New
dgpoints_to_cells(dggs, lon, lat)maps lon/lat points to grid cells and returns an sf grid with optional per-cell counts. - New
dgbin_points(dggs, lon, lat, values)aggregates point data into grid cells, returning per-cell count, mean, and/or total as a data frame. -
dgearthgrid()anddgcellstogrid()gain adensifyparameter to insert extra vertices along cell edges for smoother boundaries. -
dgearthgrid()anddgcellstogrid()now materialize sf polygon grids through a native C implementation using R’s C API, preserving DGGRID ring order and avoiding the previous s2/collapse polygon construction path. Illustrative conversion timings for full-earth grids improved from 3.854s to 0.150s at res 9 (~26x). This is achieved also via the wk package. - pkgdown site added at https://sebkrantz.github.io/dggridR/.
dggridR 4.0.0
- Updated bundled DGGRID C++ engine to v9.0b (upstream SebKrantz/DGGRID).
- Re-architected
DgIDGGSBase::makeRF()call for new v9.0b parameter order (isApSeq,DgApSeq,hierNdxSysType). -
update_from_upstream.shrewritten for macOS compatibility (Perl-based text transforms) and updated to track SebKrantz/DGGRID. - Fixed numeric precision issue on Apple Silicon introduced by DGGRID v9.0b.
- New DeepWiki AI documentation at https://deepwiki.com/r-barnes/dggridR.
dggridR 3.1.0
CRAN release: 2024-07-26
- Fixed a numeric precision issue on Apple Silicon (#63).
- Removed dplyr, rlang, and sp as dependencies; added collapse and s2 (zero additional transitive dependencies), yielding significant performance gains especially in grid materialization.
-
dgshptogrid()now accepts an sf object in memory in addition to a shapefile path. -
dgcellstogrid(),dgearthgrid(),dgrectgrid(), anddgshptogrid()gainreturn_sf = TRUE; settingreturn_sf = FALSEreturns a memory-efficient long data frame of cell-vertex coordinates.
dggridR 3.0.0
CRAN release: 2023-01-18
- Fixes memory leaks in DGGRID.
- Switches from rgdal to the sf package.
-
dgtransform()removed (previously deprecated); usedgGEO_to_SEQNUM()instead.
dggridR 2.0.3
CRAN release: 2018-04-06
- Fixed bugs in
dgshptogrid()anddgrectgrid()wherecellsizewas not respected. - More informative warning messages.
dggridR 2.0.0
- Complete restructuring of the internal C++ engine for improved speed and robustness across operating systems.
- Restructured engine directory layout to reduce compilation complexity.
-
dg_shpfname_south_africa()converted from an object to a function.
dggridR 1.0.0
-
dgconstruct()gainsazimuth,pole_lat, andpole_lonparameters. - Added pentagon location map to the vignette.
dggridR 0.1.0 and earlier
- Initial development releases: grid generation, shapefile support (
dgshptogrid()), debugging utilities, FLOSS licensing via Clipper, and various compiler-compatibility and CRAN-compliance fixes.