33 bool formatGeographic = ( format ==
"DM" || format ==
"DMS" || format ==
"D" );
45 dp = static_cast<int>( ceil( -1.0 * log10( mapUnitsPerPixel ) ) );
49 dp = format ==
"D" ? 4 : 2;
67 if ( format ==
"DM" || format ==
"DMS" || format ==
"D" )
76 geo = ct.transform( point );
86 else if ( format ==
"DMS" )
QString readEntry(const QString &scope, const QString &key, const QString &def=QString::null, bool *ok=nullptr) const
bool readBoolEntry(const QString &scope, const QString &key, bool def=false, bool *ok=nullptr) const
QString toDegreesMinutes(int thePrecision, const bool useSuffix=true, const bool padded=false) const
Return a string representation as degrees minutes.
bool qgsDoubleNear(double a, double b, double epsilon=4 *DBL_EPSILON)
Compare two doubles (but allow some difference)
int readNumEntry(const QString &scope, const QString &key, int def=0, bool *ok=nullptr) const
QString toDegreesMinutesSeconds(int thePrecision, const bool useSuffix=true, const bool padded=false) const
Return a string representation as degrees minutes seconds.
A class to represent a point.
QString toString() const
String representation of the point (x,y)
const long GEOSRID
Magic number for a geographic coord sys in POSTGIS SRID.
static QgsProject * instance()
Returns the QgsProject singleton instance.
Class for storing a coordinate reference system (CRS)
Custom exception class for Coordinate Reference System related exceptions.
bool geographicFlag() const
Returns whether the CRS is a geographic CRS.
bool isValid() const
Returns whether this CRS is correctly initialized and usable.