[gdal-dev] Transforming Raster Points from GeoTIFF with GCPs
Yann-Sebastien Tremblay-Johnston
yanns.tremblay at gmail.com
Fri Dec 10 10:38:40 PST 2021
Simon,
See the Transformer API, in particular
https://gdal.org/api/gdal_alg.html?highlight=transformer#_CPPv419GDALTransformerFunc
(or gdal.Transformer in Python).
Sebastien
On Fri, Dec 10, 2021 at 10:24 AM Simon Eves <simon.eves at omnisci.com> wrote:
> 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
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211210/53dd05e6/attachment.html>
More information about the gdal-dev
mailing list