[gdal-dev] Corner Coordinates for GeoTIFF/GeoPDF

Cory Foy foyc at flighttactics.com
Thu Sep 4 14:01:49 PDT 2025


Hi Greg,

> You didn't say, but presumably the geopdf is in some projected
> coordinate system, and you are working in a projected coordinate system
> also.   Or perhaps the geopdf is projected but not really aligned to a
> particular CRS.  All things to understand.

Thank you!! This was the exact pointer I needed. Looking closer at the gdalinfo with your comment in context made me realize I was seeing the WGS84, but missing the line above it that says PROJCRS["Popular Visualisation CRS / Mercator”! That let me do this:

let spatialReference: OGRSpatialReferenceH? = nil
OSRSetFromUserInput(spatialReference, "EPSG:3857")
var env: OGREnvelope = OGREnvelope()
GDALGetExtent(self.dataset, &env, spatialReference)

Which got me much closer to what I needed. Thanks so much for everyone’s help - I think I’m on the right path now.

Cory

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3965 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250904/45ce2bc9/attachment.bin>


More information about the gdal-dev mailing list