Repository navigation
feat: Expose GeogTOWGS84GeoKey and ProjRectifiedGridAngleGeoKey - #368
Merged
Merged
Conversation
This was referenced Oct 26, 2026
GDAL writes GeogTOWGS84GeoKey (2062) for any CRS with +towgs84 and ProjRectifiedGridAngleGeoKey (3096) for every Hotine Oblique Mercator file, but GeoKeyDirectory skipped both as unknown keys, so a GeoKey to CRS builder could not recover the datum shift or the grid angle. Add geog_towgs84 (3 or 7 doubles) and proj_rectified_grid_angle to the Rust struct and the Python class, following the existing pattern. Closes #367 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
kylebarron
force-pushed
the
kyle/geokeys-towgs84-rectified-grid-angle
branch
from
October 26, 2026 16:18
9ac9c7b to
0080745
Compare
This was referenced Oct 26, 2026
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.
Note
This PR was written by Claude (Claude Code), not by @kylebarron.
Closes #367
GDAL writes
GeogTOWGS84GeoKey(2062) for any CRS carrying+towgs84=andProjRectifiedGridAngleGeoKey(3096) for every Hotine Oblique Mercator file (CT codes 3 and 9815, which includes+proj=somerc).GeoKeyDirectoryskipped both as unknown keys, so a GeoKey-to-CRS builder could not recover the datum shift or the grid angle.Changes
GeoKeyTag: addGeogTOWGS84 = 2062andProjRectifiedGridAngle = 3096.GeoKeyDirectory: addgeog_towgs84: Option<Vec<f64>>(3 or 7 doubles, read withinto_f64_vec) andproj_rectified_grid_angle: Option<f64>.GeoKeyDirectory: same two fields, wired intokeys(),__getitem__, bothFromimpls, and the.pyistub with docstrings.Tests
from_tags.fixtures/other/geogtowgs_subset_USGS_13_s14w171.tifalready carries a 3-value key 2062; the Rust test that opens it now asserts the value, and the Pythontest_ifd_dictexpected dict gainsgeog_towgs84: [0.0, 0.0, 0.0].cargo test --all --all-featurespasses apart fromtest_ome_tiff_single_channel, which timed out fetching its remote file fromcildata.crbs.ucsd.eduand is unrelated.cargo clippyfor both crates,cargo fmtwith the CI config, and the full Python suite (52 tests) pass.🤖 Written by Claude Code
🤖 Generated with Claude Code