17 #ifndef QGSCOORDINATETRANSFORM_H
18 #define QGSCOORDINATETRANSFORM_H
131 QgsPoint transform(
const QgsPoint p, TransformDirection direction = ForwardTransform )
const;
141 QgsPoint transform(
const double x,
const double y, TransformDirection direction = ForwardTransform )
const;
155 QgsRectangle transformBoundingBox(
const QgsRectangle theRect, TransformDirection direction = ForwardTransform,
const bool handle180Crossover =
false )
const;
160 void transformInPlace(
double& x,
double& y,
double &z, TransformDirection direction = ForwardTransform )
const;
162 void transformInPlace( qreal& x, qreal& y,
double &z, TransformDirection direction = ForwardTransform )
const;
166 void transformInPlace( QVector<double>& x, QVector<double>& y, QVector<double>& z,
167 TransformDirection direction = ForwardTransform )
const;
169 void transformPolygon( QPolygonF& poly, TransformDirection direction = ForwardTransform )
const;
172 void transformInPlace(
float& x,
float& y,
float& z, TransformDirection direction = ForwardTransform )
const;
174 void transformInPlace( QVector<float>& x, QVector<float>& y, QVector<float>& z,
175 TransformDirection direction = ForwardTransform )
const;
197 void transformCoords(
const int &numPoint,
double *x,
double *y,
double *z, TransformDirection direction = ForwardTransform )
const;
219 void setDestCRSID(
long theCRSID );
225 static QString datumTransformString(
int datumTransform );
228 static bool datumTransformCrsInfo(
int datumTransform,
int& epsgNr, QString& srcProjection, QString& dstProjection, QString &remarks, QString &scope,
bool &preferred,
bool &deprecated );
243 bool readXML( QDomNode & theNode );
250 bool writeXML( QDomNode & theNode, QDomDocument & theDoc );
254 void invalidTransformInput()
const;
267 bool mInitialisedFlag;
287 projPJ mDestinationProjection;
289 int mSourceDatumTransform;
290 int mDestinationDatumTransform;
298 static QString stripDatumTransform(
const QString& proj4 );
299 static void searchDatumTransform(
const QString& sql, QList< int >& transforms );
301 void addNullGridShifts( QString& srcProjString, QString& destProjString );
307 QString mySummary(
"\n%%%%%%%%%%%%%%%%%%%%%%%%\nCoordinate Transform def begins:" );
308 mySummary +=
"\n\tInitialised? : ";
324 mySummary +=
"\n\tShort Circuit? : ";
334 mySummary +=
"\n\tSource Spatial Ref Sys : ";
341 mySummary +=
"Undefined";
344 mySummary +=
"\n\tDest Spatial Ref Sys : ";
351 mySummary +=
"Undefined";
355 mySummary += (
"\nCoordinate Transform def ends \n%%%%%%%%%%%%%%%%%%%%%%%%\n" );
356 return os << mySummary.toLocal8Bit().data() << std::endl;
360 #endif // QGSCOORDINATETRANSFORM_H