Skip to content

Add crs and bin size metadata fields to VariableMetadata#794

Open
keylgonz wants to merge 1 commit intoTGSAI:mainfrom
keylgonz:feature/add-crs-and-bin-size-metadata
Open

Add crs and bin size metadata fields to VariableMetadata#794
keylgonz wants to merge 1 commit intoTGSAI:mainfrom
keylgonz:feature/add-crs-and-bin-size-metadata

Conversation

@keylgonz
Copy link

Adds three optional fields to VariableMetadata for seismic survey geometry:

  • crs: Coordinate Reference System (e.g., "EPSG:32610")
  • bin_inl: Inline bin size
  • bin_xl: Crossline bin size

Includes test coverage.

Add crs, bin_inl, and bin_xl optional fields to support coordinate
reference system and bin size metadata for seismic data variables.

Made-with: Cursor
@codecov
Copy link

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.36%. Comparing base (c3ba558) to head (763c5c0).
⚠️ Report is 228 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #794      +/-   ##
==========================================
+ Coverage   85.30%   89.36%   +4.06%     
==========================================
  Files          46      104      +58     
  Lines        2219     6086    +3867     
  Branches      306      406     +100     
==========================================
+ Hits         1893     5439    +3546     
- Misses        281      547     +266     
- Partials       45      100      +55     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

description="Minimal summary statistics.",
)

crs: str | None = Field(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think a string CRS will be sufficient here. We should have support for the most common expected systems. An example of making it more usable might be:

{
  "CRS": {
    "type": "EPSG",
    "code": 1234
  }
}

There are probably several projection systems that we should support, if you could please take a look.

You can see how we might want to structure this as a set of enums similar to unitsV1. We will want to leave an escape hatch for custom free-form CRS data as well.

description="Coordinate Reference System as an EPSG code (e.g., 'EPSG:4326').",
)

bin_inl: float | None = Field(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bin_inl and bin_xl are too specific to a use-cases with 3D poststack data. I would recommend looking into adding it in dimensions.py and updating its key to be nominal_bin to support non-binned data as well.

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.

2 participants