35 QString format =
QgsProject::instance()->
readEntry( QStringLiteral(
"PositionPrecision" ), QStringLiteral(
"/DegreeFormat" ), QStringLiteral(
"MU" ) );
36 bool formatGeographic = ( format == QLatin1String(
"DM" ) || format == QLatin1String(
"DMS" ) || format == QLatin1String(
"D" ) );
48 dp = static_cast<int>( std::ceil( -1.0 * std::log10( mapUnitsPerPixel ) ) );
52 dp = format == QLatin1String(
"D" ) ? 4 : 2;
70 QString format = project->
readEntry( QStringLiteral(
"PositionPrecision" ), QStringLiteral(
"/DegreeFormat" ), QStringLiteral(
"MU" ) );
73 if ( format == QLatin1String(
"DM" ) || format == QLatin1String(
"DMS" ) || format == QLatin1String(
"D" ) )
82 geo = ct.transform( point );
90 if ( format == QLatin1String(
"DM" ) )
92 else if ( format == QLatin1String(
"DMS" ) )
QString readEntry(const QString &scope, const QString &key, const QString &def=QString(), bool *ok=nullptr) const
bool readBoolEntry(const QString &scope, const QString &key, bool def=false, bool *ok=nullptr) const
A class to represent a 2D point.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
int readNumEntry(const QString &scope, const QString &key, int def=0, bool *ok=nullptr) const
Reads and writes project states.
bool isGeographic() const
Returns whether the CRS is a geographic CRS (using lat/lon coordinates)
const long GEOSRID
Magic number for a geographic coord sys in POSTGIS SRID.
static QgsProject * instance()
Returns the QgsProject singleton instance.
This class represents a coordinate reference system (CRS).
Custom exception class for Coordinate Reference System related exceptions.
bool isValid() const
Returns whether this CRS is correctly initialized and usable.