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 <[email protected]> wrote: > and https://gdal.org/programs/gdaltransform.html > > > > -Matt > > > > *From:* gdal-dev <[email protected]> *On Behalf Of *Simon > Eves > *Sent:* December 10, 2021 12:21 PM > *To:* Yann-Sebastien Tremblay-Johnston <[email protected]> > *Cc:* gdal dev <[email protected]> > *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 < > [email protected]> 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 <[email protected]> > 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: [email protected] | Cell: > > +1 (415) 902-1996 > > > > _______________________________________________ > gdal-dev mailing list > [email protected] > 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: [email protected] | 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: [email protected] | Cell: +1 (415) 902-1996
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
