feat: spatRelate generic + giottoSpatial method#376
Merged
Conversation
New S4 generic for the "filter form" complement to relate() — returns x narrowed by a spatial predicate rather than a relation matrix. The eager method on (giottoSpatial, giottoSpatial) wraps relate() + subset; the on- disk lazy form lives in GiottoDisk via methods on parquetGeomBase. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Five tests covering the eager filter-form contract: returns same class as x, narrowed to features satisfying the predicate; default relation is intersects; predicate choice affects narrowing; empty result is a zero-row giottoSpatial. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jiajic
added a commit
to jiajic/GiottoClass
that referenced
this pull request
Jun 1, 2026
Cascades the spatRelate generic + giottoSpatial method (PR giotto-suite#376) and related cleanup commits from dev into gmulti. Clean 3-way merge — no conflicts.
2 tasks
jiajic
added a commit
that referenced
this pull request
Jun 1, 2026
overlapPointDT-class.Rd reflects PR #374 (ids = TRUE → FALSE default, updated examples). spatRelate.Rd reflects PR #376 (trimmed cross-package GiottoDisk context). Source roxygen was updated in those PRs but the generated .Rd files were not refreshed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
spatRelate()— the filter-form complement toterra::relate(). Returnsxnarrowed to features satisfying a spatial predicate against any feature ofy, rather than a relation matrix.(giottoSpatial, giottoSpatial)evaluates eagerly viarelate()+ subset.parquetGeomBase) can queue the predicate as a lazy op and avoid materializing a full relation matrix.relate()call sites for swap candidates.Test plan
tests/testthat/test-spatRelate.R— class preservation, narrowing correctness vsrelate(pairs = TRUE), default relation, predicate effects, empty result, error on invalid relation🤖 Generated with Claude Code