Expose crs as column-level DataAPI metadata on the Geometry column - #6
Draft
asinghvi17 wants to merge 1 commit into
Draft
asinghvi17 wants to merge 1 commit into
asinghvi17 wants to merge 1 commit into
Conversation
The crs belongs to the geometry column, not the table, so implement DataAPI.colmetadata* for VectorDataCubeTable with key "crs" on :Geometry. The table-level "crs" key remains as a convenience mirror. Both now use :note style so DataFrames propagates the crs through transformations (select/transform/joins) instead of dropping it. This is the package-local half of the discussion about per-dimension metadata hooks for DimTable; the upstream half is filed at rafaqz/DimensionalData.jl. Co-Authored-By: Claude Fable 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 #5. Draft for discussion — this is the package-local half of the per-dimension metadata question; the upstream half (DataAPI metadata support in
DimTableitself) is filed at rafaqz/DimensionalData.jl.Summary
DataAPI.colmetadatasupport/colmetadatakeys/colmetadataforVectorDataCubeTable: the:Geometrycolumn now carries"crs"metadata, since the CRS semantically belongs to the geometry column rather than the table."crs"key is kept as a convenience mirror.:notestyle (was:default), so DataFrames.jl propagates the crs throughselect/transform/joins instead of dropping it.Points to discuss
:notestyle means the crs survives transformations — including ones that invalidate it (e.g. reprojecting the geometry column manually). Acceptable?DataAPI.colmetadatasupport for dimension columns (from lookup metadata), this wrapper could shrink to just the crs special case — worth keeping the wrapper minimal until that lands.Test plan
Pkg.test(): 231/231 (12 new assertions covering colmetadata keys/values/styles, fallbacks, KeyError paths, and the no-crs case)🤖 Generated with Claude Code