Repository navigation
Small-union geometry storage with read-time geometry restrictions (stacked on #128) - #130
Draft
asinghvi17 wants to merge 17 commits into
Draft
asinghvi17 wants to merge 17 commits into
asinghvi17 wants to merge 17 commits into
Conversation
The measurements and trade-offs are in the PR description; the benchmark scripts in benchmark/ reproduce them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Stacked on #128 (base
json1-rewrite).Geometry fields now store
Geometry{D,T}, a small union of the seven GeoJSON geometry kinds, soFeatureandFeatureCollectionare parameterized on{D,T,P}only, with no geometry type parameter. To restrict which kinds a file may contain, useGeoJSON.read(src; geometrytype=Union{Polygon,MultiPolygon})instead of a type parameter. Any other kind raises anArgumentError.Steady-state read, write and iteration speed is unchanged. Restricted reads add no allocations.
Breaking vs #128:
{D,T,G,P}becomes{D,T,P}; customAbstractGeometrysubtypes can't be stored in these fields;Featurewithgeometry = nothingneeds explicit{D,T}. Details are in the CHANGELOG.Also: slimmer tests (569 → 534 checks, each protecting a distinct behaviour), and a fix for
GeometryCollectioniteration, which previously threw.Tested on Julia 1.10, 1.13 and nightly, plus
juliac --trim=safe. Reproduce the numbers withbenchmark/compile_latency.jl.🤖 Generated with Claude Code