Skip to content

fix: Support parsing ESRI WKT String for ESRI-created custom CRS#579

Merged
kylebarron merged 2 commits into
mainfrom
kyle/crs-custom-2
May 28, 2026
Merged

fix: Support parsing ESRI WKT String for ESRI-created custom CRS#579
kylebarron merged 2 commits into
mainfrom
kyle/crs-custom-2

Conversation

@kylebarron
Copy link
Copy Markdown
Member

Ref source-cooperative/cog-viewer#8 and developmentseed/geotiff-test-data#58 and developmentseed/async-geotiff#165. This GeoTIFF includes

GeoTIFF has model_type, geographic_type, projected_type geokeys.

  • If model_type is 1, check the projected_type
    • If projected_type is an int < 32767, it's an EPSG code; else CRS encoded in GeoKeys
  • If model_type is 2, check the geographic_type
    • If geographic_type is an int < 32767, it's an EPSG code; else CRS encoded in GeoKeys
  • If model_type is 32767, then the projection is "undefined", and there's a (hack? grandfathered?) way that uses ESRI WKT in the proj citation key.

This PR now supports the latter approach when model_type itself is 32767.

@github-actions github-actions Bot added the fix label May 28, 2026
@kylebarron kylebarron merged commit 57d3007 into main May 28, 2026
3 checks passed
@kylebarron kylebarron deleted the kyle/crs-custom-2 branch May 28, 2026 15:56
@kylebarron
Copy link
Copy Markdown
Member Author

The image still doesn't render but this is a valid improvement (with a test), so we can move the rendering question to the next branch.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant