18 #ifndef QGSCOORDINATEREFERENCESYSTEM_H
19 #define QGSCOORDINATEREFERENCESYSTEM_H
90 bool createFromId(
const long theId, CrsType theType = PostgisCrsId );
99 bool createFromOgcWmsCrs( QString theCrs );
107 bool createFromSrid(
const long theSrid );
119 bool createFromWkt(
const QString &theWkt );
129 bool createFromSrsId(
const long theSrsId );
157 bool createFromProj4(
const QString &theProjString );
166 bool createFromString(
const QString &theDefinition );
183 bool createFromUserInput(
const QString &theDefinition );
195 static void setupESRIWktFix();
198 bool isValid()
const;
222 long findMatchingProj();
237 bool readXML( QDomNode & theNode );
255 bool writeXML( QDomNode & theNode, QDomDocument & theDoc )
const;
279 long postgisSrid()
const;
285 QString authid()
const;
291 QString description()
const;
297 QString projectionAcronym()
const;
303 QString ellipsoidAcronym()
const;
308 QString toWkt()
const;
317 QString toProj4()
const;
322 bool geographicFlag()
const;
328 bool axisInverted()
const;
339 void setValidationHint( QString html );
343 QString validationHint();
355 bool saveAsUserCRS( QString name );
358 QString geographicCRSAuthId()
const;
368 static QString proj4FromSrsId(
const int theSrsId );
373 void setInternalId(
long theSrsId );
377 void setSrid(
long theSrid );
381 void setDescription( QString theDescription );
392 void setProj4String( QString theProj4String );
396 void setGeographicFlag(
bool theGeoFlag );
401 void setEpsg(
long theEpsg );
406 void setAuthId( QString theID );
410 void setProjectionAcronym( QString theProjectionAcronym );
414 void setEllipsoidAcronym( QString theEllipsoidAcronym );
432 static int openDb( QString path,
sqlite3 **db,
bool readonly =
true );
457 long getRecordCount();
460 static QString quotedValue( QString value );
464 bool loadFromDb( QString db, QString expression, QString value );
470 static bool loadIDs( QHash<int, QString> &wkts );
471 static bool loadWkts( QHash<int, QString> &wkts,
const char *filename );
472 static bool syncDatumTransform(
const QString& dbPath );
484 QString mySummary(
"\n\tSpatial Reference System:" );
485 mySummary +=
"\n\t\tDescription : ";
492 mySummary +=
"Undefined" ;
494 mySummary +=
"\n\t\tProjection : " ;
501 mySummary +=
"Undefined" ;
504 mySummary +=
"\n\t\tEllipsoid : ";
511 mySummary +=
"Undefined" ;
514 mySummary +=
"\n\t\tProj4String : " ;
521 mySummary +=
"Undefined" ;
524 return os << mySummary.toLocal8Bit().data() << std::endl;
527 #endif // QGSCOORDINATEREFERENCESYSTEM_H
QGis::UnitType mMapUnits
The map units.
QMap< QString, QString > RecordMap
bool mIsValidFlag
Whether this srs is properly defined and valid.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
QString mAuthId
If available the authority identifier for this srs.
bool mGeoFlag
Whether this is a geographic or projected coordinate system.
long mSRID
If available, the Postgis spatial_ref_sys identifier for this srs (defaults to 0) ...
QString mEllipsoidAcronym
The official proj4 acronym for the ellipoid.
static CUSTOM_CRS_VALIDATION mCustomSrsValidation
OGRSpatialReferenceH mCRS
QString mDescription
A textual description of the srs.
std::ostream & operator<<(std::ostream &os, const QgsCoordinateReferenceSystem &r)
Output stream operator.
QString ellipsoidAcronym() const
int mAxisInverted
Whether this is a coordinate system has inverted axis.
long mSrsId
The internal sqlite3 srs.db primary key for this srs.
QString projectionAcronym() const
Class for storing a coordinate reference system (CRS)
UnitType
Map units that qgis supports.
QString description() const
void(* CUSTOM_CRS_VALIDATION)(QgsCoordinateReferenceSystem &)
void * OGRSpatialReferenceH
QString toProj4() const
Get the Proj Proj4 string representation of this srs.
QString mProjectionAcronym
The official proj4 acronym for the projection family.