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