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

Simon Eves simon.eves at omnisci.com
Fri Dec 10 12:59:41 PST 2021


Thanks. The code to which I was referring in my original mail was that used
by gdaltransform. I just hadn't found the API part.

On Fri, Dec 10, 2021 at 12:45 PM <Matt.Wilkie at yukon.ca> wrote:

> and https://gdal.org/programs/gdaltransform.html
>
>
>
> -Matt
>
>
>
> *From:* gdal-dev <gdal-dev-bounces at lists.osgeo.org> *On Behalf Of *Simon
> Eves
> *Sent:* December 10, 2021 12:21 PM
> *To:* Yann-Sebastien Tremblay-Johnston <yanns.tremblay at gmail.com>
> *Cc:* gdal dev <gdal-dev at lists.osgeo.org>
> *Subject:* Re: [gdal-dev] Transforming Raster Points from GeoTIFF with
> GCPs
>
>
>
> **** External email: Do not click on links or attachments except from trusted senders. ****
>
> ********************************************************************************************
>
>
>
> Aha! That's the bit I hadn't found. Thank you! :)
>
>
>
> On Fri, Dec 10, 2021 at 10:38 AM Yann-Sebastien Tremblay-Johnston <
> yanns.tremblay at gmail.com> wrote:
>
> 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
>
>
>
>
> --
>
> <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
>
>
>


-- 
<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/8519da82/attachment.html>


More information about the gdal-dev mailing list