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 );
365 static QString proj4FromSrsId(
const int theSrsId );
370 void setInternalId(
long theSrsId );
374 void setSrid(
long theSrid );
378 void setDescription( QString theDescription );
389 void setProj4String( QString theProj4String );
393 void setGeographicFlag(
bool theGeoFlag );
398 void setEpsg(
long theEpsg );
403 void setAuthId( QString theID );
407 void setProjectionAcronym( QString theProjectionAcronym );
411 void setEllipsoidAcronym( QString theEllipsoidAcronym );
429 static int openDb( QString path,
sqlite3 **db,
bool readonly =
true );
454 long getRecordCount();
457 static QString quotedValue( QString value );
461 bool loadFromDb( QString db, QString expression, QString value );
466 static bool loadIDs( QHash<int, QString> &wkts );
467 static bool loadWkts( QHash<int, QString> &wkts,
const char *filename );
479 QString mySummary(
"\n\tSpatial Reference System:" );
480 mySummary +=
"\n\t\tDescription : ";
487 mySummary +=
"Undefined" ;
489 mySummary +=
"\n\t\tProjection : " ;
496 mySummary +=
"Undefined" ;
499 mySummary +=
"\n\t\tEllipsoid : ";
506 mySummary +=
"Undefined" ;
509 mySummary +=
"\n\t\tProj4String : " ;
516 mySummary +=
"Undefined" ;
519 return os << mySummary.toLocal8Bit().data() << std::endl;
522 #endif // QGSCOORDINATEREFERENCESYSTEM_H