18 #ifndef QGSCOORDINATEREFERENCESYSTEM_H 19 #define QGSCOORDINATEREFERENCESYSTEM_H 31 class QgsCoordinateReferenceSystemPrivate;
91 bool createFromId(
const long theId,
CrsType theType = PostgisCrsId );
98 bool createFromOgcWmsCrs(
const QString& theCrs );
106 bool createFromSrid(
const long theSrid );
119 bool createFromWkt(
const QString &theWkt );
130 bool createFromSrsId(
const long theSrsId );
159 bool createFromProj4(
const QString &theProjString );
168 bool createFromString(
const QString &theDefinition );
183 bool createFromUserInput(
const QString &theDefinition );
193 static void setupESRIWktFix();
196 bool isValid()
const;
220 long findMatchingProj();
235 bool readXML(
const QDomNode & theNode );
278 long postgisSrid()
const;
302 QString projectionAcronym()
const;
309 QString ellipsoidAcronym()
const;
331 bool geographicFlag()
const;
336 bool axisInverted()
const;
346 void setValidationHint(
const QString& html );
361 bool saveAsUserCRS(
const QString& name );
364 QString geographicCRSAuthId()
const;
380 static QString proj4FromSrsId(
const int theSrsId );
385 void setInternalId(
long theSrsId );
389 void setSrid(
long theSrid );
393 void setDescription(
const QString& theDescription );
405 void setProj4String(
const QString& theProj4String );
410 void setGeographicFlag(
bool theGeoFlag );
415 void setEpsg(
long theEpsg );
420 void setAuthId(
const QString& theID );
424 void setProjectionAcronym(
const QString& theProjectionAcronym );
428 void setEllipsoidAcronym(
const QString& theEllipsoidAcronym );
442 RecordMap getRecord(
const QString& theSql );
446 static int openDb(
const QString& path,
sqlite3 **db,
bool readonly =
true );
452 long getRecordCount();
461 static bool syncDatumTransform(
const QString& dbPath );
472 QString mySummary(
"\n\tSpatial Reference System:" );
473 mySummary +=
"\n\t\tDescription : ";
480 mySummary +=
"Undefined";
482 mySummary +=
"\n\t\tProjection : ";
489 mySummary +=
"Undefined";
492 mySummary +=
"\n\t\tEllipsoid : ";
499 mySummary +=
"Undefined";
502 mySummary +=
"\n\t\tProj4String : ";
509 mySummary +=
"Undefined";
515 #endif // QGSCOORDINATEREFERENCESYSTEM_H bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
QString toProj4() const
Returns a Proj4 string representation of this CRS.
QString ellipsoidAcronym() const
Returns the ellipsoid acronym for the ellipsoid used by the CRS.
QString description() const
Returns the descriptive name of the CRS, eg "WGS 84" or "GDA 94 / Vicgrid94".
std::ostream & operator<<(std::ostream &os, const QgsCoordinateReferenceSystem &r)
Output stream operator.
QByteArray toLocal8Bit() const
QString projectionAcronym() const
Returns the projection acronym for the projection used by the CRS.
Class for storing a coordinate reference system (CRS)
UnitType
Map units that qgis supports.
void(* CUSTOM_CRS_VALIDATION)(QgsCoordinateReferenceSystem &)
void * OGRSpatialReferenceH