<div dir="ltr"><div dir="ltr"><div>I want to expose the GDALGeoTransform class. It doesn't have a C struct representation (like OGREnvelope) or an opaque C handle type. I could add C interfaces to GDALGeoTransfor, but that seems absurd since GDALGeoTransfor is mostly a C++ wrapper of the C routines.</div><div><br></div><div>However, using the GDALGeoTransfor class directly from the SWIG interfaces works surprisingly well (See below). What doesn't work is the 'Apply' overloads which accept a `GDALRasterWindow` type, because SWIG can't include gdal_rasterband.h while CPL_SUPRESS_CPLUSPLUS is defined.</div><div><br></div><div>So my questions are: can I use the GDALGeoTransfor c++ class directly from SWIG and, if not, why?
</div><div>-------------</div><div><br></div><div>%{<br>#include "gdal_geotransform.h"<br>%}</div><div><br>class GDALGeoTransform {<br>private:<br> const double *data() const;<br> ~GDALGeoTransform();<br>public:<br>%mutable;<br> GDALGeoTransform();<br> GDALGeoTransform(const double coeffs[6]);<br> GDALGeoTransform(double xorigIn, double xscaleIn, double xrotIn, double yorigIn, double yrotIn, double yscaleIn);<br> void Rescale(double dfXRatio, double dfYRatio);<br>%immutable;<br> void Apply(double dfPixel, double dfLine, double *pdfGeoX, double *pdfGeoY) const;<br> bool GetInverse(GDALGeoTransform &inverse) const;<br> bool IsAxisAligned() const;<br>};</div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Michael Bucari</div></div>
</div>