[gdal-dev] Transforming Raster Points from GeoTIFF with GCPs

Simon Eves simon.eves at omnisci.com
Fri Dec 10 10:23:49 PST 2021


So we have a GeoTiFF of Sentinel-1 imagery which `gdalinfo` reports as
having a GCP projection with 210 points, which we'd (perhaps naively?!)
like to import directly, transforming to WGS84 on the fly.

Obviously a simple OGRSpatialReference/OGRCoordinateTransformation
transform isn't going to do anything, so I assume we have to do the GCP
transform manually.

I found the GCPCoordinateTransformation class and other supporting code in
ogr2ogr_lib.cpp as used by gdaltransform, which seems to do what we need,
but of course it's not in the core GDAL library so we can't "just use it".

Before embarking on lifting out that code to implement an on-the-fly
transformer in our system, I just wanted to make sure I wasn't missing any
functionality elsewhere that would make it easier.

It may also be more efficient to just kick off a gdalwarp to pre-convert
the file so we can just import it with no transformation required, but that
seems ugly unless it's gonna be WAY more efficient?

Thanks,

Simon

-- 
<http://www.omnisci.com/>
Simon Eves
Senior Graphics Engineer, Rendering Group
100 Montgomery St (5th Floor), San Francisco, CA 94104, USA


Email: simon.eves at omnisci.com | Cell:  +1 (415) 902-1996
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211210/fa90d647/attachment.html>


More information about the gdal-dev mailing list