Skip to content

Expose crs as column-level DataAPI metadata on the Geometry column - #6

Draft
asinghvi17 wants to merge 1 commit into
vector-zonal-tablesfrom
colmetadata-crs
Draft

asinghvi17 wants to merge 1 commit into
vector-zonal-tablesfrom
colmetadata-crs

Conversation

@asinghvi17

Copy link
Copy Markdown
Member

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 DimTable itself) is filed at rafaqz/DimensionalData.jl.

Summary

  • Implements DataAPI.colmetadatasupport / colmetadatakeys / colmetadata for VectorDataCubeTable: the :Geometry column now carries "crs" metadata, since the CRS semantically belongs to the geometry column rather than the table.
  • The table-level "crs" key is kept as a convenience mirror.
  • Both levels now use :note style (was :default), so DataFrames.jl propagates the crs through select/transform/joins instead of dropping it.

Points to discuss

  1. Should the table-level mirror stay, or is column-level alone cleaner?
  2. :note style means the crs survives transformations — including ones that invalidate it (e.g. reprojecting the geometry column manually). Acceptable?
  3. If DimensionalData grows native DataAPI.colmetadata support 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

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant