18 #ifndef QGSCOORDINATEREFERENCESYSTEM_H
19 #define QGSCOORDINATEREFERENCESYSTEM_H
83 bool createFromId(
const long theId, CrsType theType = PostgisCrsId );
92 bool createFromOgcWmsCrs( QString theCrs );
100 bool createFromSrid(
const long theSrid );
112 bool createFromWkt(
const QString theWkt );
122 Q_DECL_DEPRECATED
bool createFromEpsg(
const long theEpsg );
132 bool createFromSrsId(
const long theSrsId );
163 bool createFromProj4(
const QString theProjString );
172 bool createFromString(
const QString theDefinition );
175 bool isValid()
const;
199 long findMatchingProj();
214 bool equals( QString theProj4String );
220 bool readXML( QDomNode & theNode );
238 bool writeXML( QDomNode & theNode, QDomDocument & theDoc )
const;
260 long postgisSrid()
const;
266 Q_DECL_DEPRECATED
long epsg()
const;
272 QString authid()
const;
278 QString description()
const;
284 QString projectionAcronym()
const;
290 QString ellipsoidAcronym()
const;
295 QString toWkt()
const;
304 QString toProj4()
const;
309 bool geographicFlag()
const;
320 void setValidationHint( QString html );
324 QString validationHint();
333 static QString proj4FromSrsId(
const int theSrsId );
338 void setInternalId(
long theSrsId );
342 void setSrid(
long theSrid );
346 void setDescription( QString theDescription );
350 void setProj4String( QString theProj4String );
354 void setGeographicFlag(
bool theGeoFlag );
359 void setEpsg(
long theEpsg );
364 void setAuthId( QString theID );
368 void setProjectionAcronym( QString theProjectionAcronym );
372 void setEllipsoidAcronym( QString theEllipsoidAcronym );
390 static int openDb( QString path,
sqlite3 **db );
415 bool saveAsUserCRS();
418 long getRecordCount();
421 QString quotedValue( QString value );
425 bool loadFromDb( QString db, QString expression, QString value );
436 QString mySummary(
"\n\tSpatial Reference System:" );
437 mySummary +=
"\n\t\tDescription : ";
444 mySummary +=
"Undefined" ;
446 mySummary +=
"\n\t\tProjection : " ;
453 mySummary +=
"Undefined" ;
456 mySummary +=
"\n\t\tEllipsoid : ";
463 mySummary +=
"Undefined" ;
466 mySummary +=
"\n\t\tProj4String : " ;
473 mySummary +=
"Undefined" ;
476 return os << mySummary.toLocal8Bit().data() << std::endl;
479 #endif // QGSCOORDINATEREFERENCESYSTEM_H