Conversation
Quarto's R subprocess during R CMD build does not inherit the temp library path from R_LIBS, causing library(duckspatial) to fail on some platforms (notably Windows r-hub). Each vignette's first hidden chunk now explicitly adds R_LIBS entries to .libPaths(). Also corrects actions/checkout@v6 (non-existent) to @v4 in check.yaml. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
r-hub Linux containers run as root without sudo or jq, which are required by quarto-dev/quarto-actions/setup@v2. Install them first via apt-get (no sudo needed since the container is already root). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
'data data sets' -> 'datasets', '&' -> 'and' to satisfy CRAN incoming feasibility checks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CRAN rejected 1.1.2 as it matches the existing published version. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The atlas platform uses a Fedora-based container without apt-get; fall back to dnf/yum so the sudo and jq install step succeeds there. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Wraps ST_NumInteriorRings to return the number of interior rings (holes) in a POLYGON geometry. Documented alongside the other geometry-component counters (ddbs_get_npoints, ddbs_get_ngeometries). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a symmetric family of deserializers that parse serialized geometries into a spatial object, the inverse of the ddbs_as_*() serializers: - ddbs_geom_from_text() (ST_GeomFromText) - ddbs_geom_from_wkb() (ST_GeomFromWKB) - ddbs_geom_from_hexwkb() (ST_GeomFromHEXWKB) - ddbs_geom_from_hexewkb() (ST_GeomFromHEXEWKB) - ddbs_geom_from_geojson() (ST_GeomFromGeoJSON) They take an R vector (or a list of raw WKB vectors) plus a crs and return a duckspatial_df/sf, optionally writing a named table. Shared logic lives in the new template_geom_from() helper. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The quarto-actions/setup action downloads the Quarto bundle with wget, which is absent from the Fedora-based atlas container. Add it to the dependency install step alongside sudo and jq. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a dedicated R/ddbs_mvt.R gathering all Mapbox Vector Tile support: - ddbs_as_mvt_geom(): low-level ST_AsMVTGeom wrapper mapping geometries into tile pixel space (drops CRS via a new template_unary_ops drop_crs flag). - ddbs_write_mbtiles(): generates a vector tile pyramid (ST_AsMVTGeom + ST_AsMVT over a computed XYZ tile grid) and writes it to an MBTiles SQLite file through DuckDB's sqlite extension. Non-geometry columns are carried as feature properties (cast to MVT-supported types). The result can be served or converted to PMTiles for use with mapgl. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…141). Previously the function serialized only the geometry column via ST_AsGeoJSON, dropping all attributes. It now builds a complete GeoJSON Feature per row, placing non-geometry columns in the properties member (empty object when there are none). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Building on the all-columns fix, ddbs_as_geojson() now defaults to a single GeoJSON FeatureCollection string (class "geojson"/"json"), structurally matching geojsonsf::sf_geojson() — the canonical form for writing .geojson files and feeding web mapping libraries. Pass feature_collection = FALSE for the previous one-Feature-per-row vector. Empty inputs yield a valid empty FeatureCollection. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The previous json_object/json_group_array approach round-tripped every geometry through the JSON type, which was slow and exploded memory on large data (OOM at ~23 GiB for 1e7 points). Build the Feature strings and the FeatureCollection with plain SQL string concatenation and string_agg instead: ~2x faster than the old code, faster than geojsonsf::sf_geojson(), and a fraction of the memory. Also bump the development version and drop the obsolete ddbs_as_geojson() macro test (the macro is per-row and no longer matches the function's FeatureCollection output). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…agg, ddbs_line_node, ddbs_reduce_precision (#143). Add five wrappers for DuckDB spatial functions, each also registered as a macro for use inside dplyr verbs: - ddbs_reverse() -> ST_Reverse - ddbs_normalize() -> ST_Normalize - ddbs_intersection_agg() -> ST_Intersection_Agg (optional `by` grouping) - ddbs_line_node() -> ST_Node - ddbs_reduce_precision() -> ST_ReducePrecision Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…AUDE.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Glimpse a DuckDB extension's row from duckdb_extensions() (the spatial extension by default), showing installed/loaded status, version, and install path. Defaults conn = NULL to the default connection, matching the rest of the package. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Feature/cran issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NEW FEATURES (#143)
ddbs_extension_info(): prints aglimpse()of a DuckDB extension's row fromduckdb_extensions()(the spatial extension by default), showing its installed/loaded status, version, and install path.ddbs_reduce_precision(): snaps geometry coordinates to a regular grid, reducing their precision.ddbs_line_node(): nodes a set of line geometries, splitting them at every crossing and returning a fully nodedMULTILINESTRING.ddbs_intersection_agg(): computes the geometric intersection (common area) of a set of geometries, optionally grouped by one or more columns. The intersection counterpart toddbs_union_agg().ddbs_reverse(): returns each geometry with the order of its vertices reversed.ddbs_normalize(): returns each geometry in its normalized (canonical) form.ddbs_write_mbtiles(): generates a Mapbox Vector Tile pyramid from a spatial dataset and writes it to an MBTiles file, ready to serve or convert to PMTiles.ddbs_as_mvt_geom(): transforms geometries into Mapbox Vector Tile (MVT) coordinate space, clipping them to a tile's bounding box and mapping the coordinates into the tile's integer pixel space.ddbs_geom_from_text(),ddbs_geom_from_wkb(),ddbs_geom_from_hexwkb(),ddbs_geom_from_hexewkb(),ddbs_geom_from_geojson(): parse serialized geometries (WKT, WKB, HEXWKB, HEXEWKB, GeoJSON) into a spatial object. These are the inverses of theddbs_as_*()serializers.ddbs_get_ninterior_rings(): returns the number of interior rings (holes) in a POLYGON geometry.ENHANCEMENTS
ddbs_install(): gains areposargument to install an extension from a specific DuckDB repository (e.g."core","core_nightly","community"). WhenNULL(default), the previous behaviour is kept (core, then community) (Allowddbs_installto install extensions from any repository #144).ddbs_as_geojson(): now includes all non-geometry columns as featurepropertiesinstead of serializing only the geometry. By default it returns a single GeoJSONFeatureCollection(matchinggeojsonsf::sf_geojson()); passfeature_collection = FALSEfor a vector with oneFeatureper row (ddbs_as_geojson()should convert all the features #141).BUG FIXES
ddbs_install(): removed a broken "already on the latest version" check that referenced arequires_version_upgradecolumn whichduckdb_extensions()does not provide (and comparedinstall_modewith the wrong case), so it never took effect (Allowddbs_installto install extensions from any repository #144).