mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-31 00:03:42 -04:00
Removed Ellipsoid button and added "NONE" as a selectable ellipsoid.
All three measure dialog now work on the same global setting, using ellipsodial calculation only if CRS transformation is turned on in Project Settings, and if the chosen ellipsoid is != "NONE". An old bug made "NONE" not selectable!
This commit is contained in:
parent
950bc2fa63
commit
24e6862db0
@ -26,9 +26,6 @@ QgsDisplayAngle::QgsDisplayAngle( QgsMapToolMeasureAngle * tool, Qt::WFlags f )
|
||||
setupUi( this );
|
||||
QSettings settings;
|
||||
|
||||
// Update when the ellipsoidal button has changed state.
|
||||
connect( mcbProjectionEnabled, SIGNAL( stateChanged( int ) ),
|
||||
this, SLOT( ellipsoidalButton() ) );
|
||||
// Update whenever the canvas has refreshed. Maybe more often than needed,
|
||||
// but at least every time any canvas related settings changes
|
||||
connect( mTool->canvas(), SIGNAL( mapCanvasRefreshed() ),
|
||||
@ -42,10 +39,6 @@ QgsDisplayAngle::~QgsDisplayAngle()
|
||||
|
||||
}
|
||||
|
||||
bool QgsDisplayAngle::projectionEnabled()
|
||||
{
|
||||
return mcbProjectionEnabled->isChecked();
|
||||
}
|
||||
|
||||
void QgsDisplayAngle::setValueInRadians( double value )
|
||||
{
|
||||
@ -53,52 +46,13 @@ void QgsDisplayAngle::setValueInRadians( double value )
|
||||
updateUi();
|
||||
}
|
||||
|
||||
void QgsDisplayAngle::ellipsoidalButton()
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
// We set check state to Unchecked and button to Disabled when disabling CRS,
|
||||
// which generates a call here. Ignore that event!
|
||||
if ( mcbProjectionEnabled->isEnabled() )
|
||||
{
|
||||
if ( mcbProjectionEnabled->isChecked() )
|
||||
{
|
||||
settings.setValue( "/qgis/measure/projectionEnabled", 2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
settings.setValue( "/qgis/measure/projectionEnabled", 0 );
|
||||
}
|
||||
updateSettings();
|
||||
}
|
||||
}
|
||||
|
||||
void QgsDisplayAngle::updateSettings()
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
int s = settings.value( "/qgis/measure/projectionEnabled", "2" ).toInt();
|
||||
if ( s == 2 )
|
||||
{
|
||||
mEllipsoidal = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mEllipsoidal = false;
|
||||
}
|
||||
QgsDebugMsg( "****************" );
|
||||
QgsDebugMsg( QString( "Ellipsoidal: %1" ).arg( mEllipsoidal ? "true" : "false" ) );
|
||||
|
||||
updateUi();
|
||||
emit changeProjectionEnabledState();
|
||||
|
||||
}
|
||||
|
||||
void QgsDisplayAngle::updateUi()
|
||||
{
|
||||
mcbProjectionEnabled->setEnabled( mTool->canvas()->hasCrsTransformEnabled() );
|
||||
mcbProjectionEnabled->setCheckState( mTool->canvas()->hasCrsTransformEnabled()
|
||||
&& mEllipsoidal ? Qt::Checked : Qt::Unchecked );
|
||||
|
||||
QSettings settings;
|
||||
QString unitString = settings.value( "/qgis/measure/angleunits", "degrees" ).toString();
|
||||
|
@ -31,17 +31,11 @@ class QgsDisplayAngle: public QDialog, private Ui::QgsDisplayAngleBase
|
||||
be converted to degrees / gon automatically if necessary*/
|
||||
void setValueInRadians( double value );
|
||||
|
||||
bool projectionEnabled();
|
||||
|
||||
|
||||
signals:
|
||||
void changeProjectionEnabledState();
|
||||
|
||||
private slots:
|
||||
|
||||
//! When the ellipsoidal button is pressed/toggled.
|
||||
void ellipsoidalButton();
|
||||
|
||||
//! When any external settings change
|
||||
void updateSettings();
|
||||
|
||||
@ -49,9 +43,6 @@ class QgsDisplayAngle: public QDialog, private Ui::QgsDisplayAngleBase
|
||||
//! pointer to tool which owns this dialog
|
||||
QgsMapToolMeasureAngle * mTool;
|
||||
|
||||
//! Holds what the user last set ellipsoid button to.
|
||||
bool mEllipsoidal;
|
||||
|
||||
//! The value we're showing
|
||||
double mValue;
|
||||
|
||||
|
@ -180,17 +180,17 @@ void QgsMapToolMeasureAngle::changeProjectionEnabledState()
|
||||
void QgsMapToolMeasureAngle::configureDistanceArea()
|
||||
{
|
||||
QSettings settings;
|
||||
QString ellipsoidId = settings.value( "/qgis/measure/ellipsoid", "WGS84" ).toString();
|
||||
QString ellipsoidId = settings.value( "/qgis/measure/ellipsoid", GEO_NONE ).toString();
|
||||
mDa.setSourceCrs( mCanvas->mapRenderer()->destinationCrs().srsid() );
|
||||
mDa.setEllipsoid( ellipsoidId );
|
||||
int s = settings.value( "/qgis/measure/projectionEnabled", "2" ).toInt();
|
||||
if ( s == 2 )
|
||||
// Only use ellipsoidal calculation when project wide transformation is enabled.
|
||||
if ( mCanvas->mapRenderer()->hasCrsTransformEnabled() )
|
||||
{
|
||||
mDa.setEllipsoidalMode( mResultDisplay->projectionEnabled() );
|
||||
mDa.setEllipsoidalMode( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
mDa.setEllipsoidalMode( mResultDisplay->projectionEnabled() );
|
||||
mDa.setEllipsoidalMode( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,9 +48,6 @@ QgsMeasureDialog::QgsMeasureDialog( QgsMeasureTool* tool, Qt::WFlags f )
|
||||
item->setTextAlignment( 0, Qt::AlignRight );
|
||||
mTable->addTopLevelItem( item );
|
||||
|
||||
// Update when the ellipsoidal button has changed state.
|
||||
connect( mcbProjectionEnabled, SIGNAL( stateChanged( int ) ),
|
||||
this, SLOT( ellipsoidalButton() ) );
|
||||
// Update whenever the canvas has refreshed. Maybe more often than needed,
|
||||
// but at least every time any canvas related settings changes
|
||||
connect( mTool->canvas(), SIGNAL( mapCanvasRefreshed() ),
|
||||
@ -59,51 +56,32 @@ QgsMeasureDialog::QgsMeasureDialog( QgsMeasureTool* tool, Qt::WFlags f )
|
||||
updateSettings();
|
||||
}
|
||||
|
||||
void QgsMeasureDialog::ellipsoidalButton()
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
// We set check state to Unchecked and button to Disabled when disabling CRS,
|
||||
// which generates an call here. Ignore that event!
|
||||
if ( mcbProjectionEnabled->isEnabled() )
|
||||
{
|
||||
if ( mcbProjectionEnabled->isChecked() )
|
||||
{
|
||||
settings.setValue( "/qgis/measure/projectionEnabled", 2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
settings.setValue( "/qgis/measure/projectionEnabled", 0 );
|
||||
}
|
||||
updateSettings();
|
||||
}
|
||||
}
|
||||
|
||||
void QgsMeasureDialog::updateSettings()
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
int s = settings.value( "/qgis/measure/projectionEnabled", "2" ).toInt();
|
||||
if ( s == 2 )
|
||||
mDecimalPlaces = settings.value( "/qgis/measure/decimalplaces", "3" ).toInt();
|
||||
mCanvasUnits = mTool->canvas()->mapUnits();
|
||||
mDisplayUnits = QGis::fromLiteral( settings.value( "/qgis/measure/displayunits", QGis::toLiteral( QGis::Meters ) ).toString() );
|
||||
// Configure QgsDistanceArea
|
||||
mDa.setSourceCrs( mTool->canvas()->mapRenderer()->destinationCrs().srsid() );
|
||||
mDa.setEllipsoid( settings.value( "/qgis/measure/ellipsoid", GEO_NONE ).toString() );
|
||||
// Only use ellipsoidal calculation when project wide transformation is enabled.
|
||||
if ( mTool->canvas()->mapRenderer()->hasCrsTransformEnabled() )
|
||||
{
|
||||
mEllipsoidal = true;
|
||||
mDa.setEllipsoidalMode( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
mEllipsoidal = false;
|
||||
mDa.setEllipsoidalMode( false );
|
||||
}
|
||||
|
||||
mDecimalPlaces = settings.value( "/qgis/measure/decimalplaces", "3" ).toInt();
|
||||
mCanvasUnits = mTool->canvas()->mapUnits();
|
||||
mDisplayUnits = QGis::fromLiteral( settings.value( "/qgis/measure/displayunits", QGis::toLiteral( QGis::Meters ) ).toString() );
|
||||
|
||||
QgsDebugMsg( "****************" );
|
||||
QgsDebugMsg( QString( "Ellipsoidal: %1" ).arg( mEllipsoidal ? "true" : "false" ) );
|
||||
QgsDebugMsg( QString( "Decimalpla.: %1" ).arg( mDecimalPlaces ) );
|
||||
QgsDebugMsg( QString( "Display u. : %1" ).arg( QGis::toLiteral( mDisplayUnits ) ) );
|
||||
QgsDebugMsg( QString( "Canvas u. : %1" ).arg( QGis::toLiteral( mCanvasUnits ) ) );
|
||||
|
||||
configureDistanceArea();
|
||||
QgsDebugMsg( QString( "Ellipsoid ID : %1" ).arg( mDa.ellipsoid() ) );
|
||||
QgsDebugMsg( QString( "Ellipsoidal : %1" ).arg( mDa.ellipsoidalEnabled() ? "true" : "false" ) );
|
||||
QgsDebugMsg( QString( "Decimalplaces: %1" ).arg( mDecimalPlaces ) );
|
||||
QgsDebugMsg( QString( "Display units: %1" ).arg( QGis::toLiteral( mDisplayUnits ) ) );
|
||||
QgsDebugMsg( QString( "Canvas units : %1" ).arg( QGis::toLiteral( mCanvasUnits ) ) );
|
||||
|
||||
// clear interface
|
||||
mTable->clear();
|
||||
@ -243,11 +221,6 @@ QString QgsMeasureDialog::formatArea( double area )
|
||||
|
||||
void QgsMeasureDialog::updateUi()
|
||||
{
|
||||
// If project wide transformation is off, disbale checkbox and unmark it.
|
||||
// When on, enable checbox and mark with saved value.
|
||||
mcbProjectionEnabled->setEnabled( mTool->canvas()->hasCrsTransformEnabled() );
|
||||
mcbProjectionEnabled->setCheckState( mTool->canvas()->hasCrsTransformEnabled() && mEllipsoidal ? Qt::Checked : Qt::Unchecked );
|
||||
|
||||
// Set tooltip to indicate how we calculate measurments
|
||||
QString toolTip = tr( "The calculations are based on:" );
|
||||
if ( ! mTool->canvas()->hasCrsTransformEnabled() )
|
||||
@ -337,12 +310,3 @@ void QgsMeasureDialog::convertMeasurement( double &measure, QGis::UnitType &u, b
|
||||
u = myUnits;
|
||||
}
|
||||
|
||||
void QgsMeasureDialog::configureDistanceArea()
|
||||
{
|
||||
QSettings settings;
|
||||
QString ellipsoidId = settings.value( "/qgis/measure/ellipsoid", "WGS84" ).toString();
|
||||
mDa.setSourceCrs( mTool->canvas()->mapRenderer()->destinationCrs().srsid() );
|
||||
mDa.setEllipsoid( ellipsoidId );
|
||||
// Only use ellipsoidal calculation when project wide transformation is enabled.
|
||||
mDa.setEllipsoidalMode( mEllipsoidal && mTool->canvas()->hasCrsTransformEnabled() );
|
||||
}
|
||||
|
@ -63,9 +63,6 @@ class QgsMeasureDialog : public QDialog, private Ui::QgsMeasureBase
|
||||
//! Show the help for the dialog
|
||||
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
|
||||
|
||||
//! When the ellipsoidal button is pressed/toggled.
|
||||
void ellipsoidalButton();
|
||||
|
||||
//! When any external settings change
|
||||
void updateSettings();
|
||||
|
||||
@ -83,16 +80,10 @@ class QgsMeasureDialog : public QDialog, private Ui::QgsMeasureBase
|
||||
//! Converts the measurement, depending on settings in options and current transformation
|
||||
void convertMeasurement( double &measure, QGis::UnitType &u, bool isArea );
|
||||
|
||||
//! Configures distance area objects with ellipsoid / output crs
|
||||
void configureDistanceArea();
|
||||
|
||||
double mTotal;
|
||||
|
||||
//! indicates whether we're measuring distances or areas
|
||||
bool mMeasureArea;
|
||||
|
||||
//! indicates whether user wants ellipsoidal or flat
|
||||
bool mEllipsoidal;
|
||||
|
||||
//! Number of decimal places we want.
|
||||
int mDecimalPlaces;
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "qgsoptions.h"
|
||||
#include "qgis.h"
|
||||
#include "qgisapp.h"
|
||||
#include "qgsmapcanvas.h"
|
||||
#include "qgsmaprenderer.h"
|
||||
#include "qgsgenericprojectionselector.h"
|
||||
#include "qgscoordinatereferencesystem.h"
|
||||
#include "qgstolerance.h"
|
||||
@ -47,8 +49,6 @@
|
||||
#include <limits>
|
||||
#include <sqlite3.h>
|
||||
#include "qgslogger.h"
|
||||
#define ELLIPS_FLAT "NONE"
|
||||
#define ELLIPS_FLAT_DESC "None / Planimetric"
|
||||
|
||||
#define CPL_SUPRESS_CPLUSPLUS
|
||||
#include <gdal.h>
|
||||
@ -56,6 +56,7 @@
|
||||
#include <cpl_conv.h> // for setting gdal options
|
||||
|
||||
#include "qgsconfig.h"
|
||||
const char * QgsOptions::GEO_NONE_DESC = QT_TRANSLATE_NOOP( "QgsOptions", "None / Planimetric" );
|
||||
|
||||
/**
|
||||
* \class QgsOptions - Set user options and preferences
|
||||
@ -278,9 +279,23 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
|
||||
leProjectGlobalCrs->setText( mDefaultCrs.authid() + " - " + mDefaultCrs.description() );
|
||||
|
||||
// populate combo box with ellipsoids
|
||||
QgsDebugMsg( "Setting upp ellipsoid" );
|
||||
|
||||
getEllipsoidList();
|
||||
// Pre-select current ellipsoid
|
||||
QString myEllipsoidId = settings.value( "/qgis/measure/ellipsoid", "WGS84" ).toString();
|
||||
cmbEllipsoid->setItemText( cmbEllipsoid->currentIndex(), getEllipsoidName( myEllipsoidId ) );
|
||||
cmbEllipsoid->setCurrentIndex( cmbEllipsoid->findText( getEllipsoidName( myEllipsoidId ), Qt::MatchExactly ) );
|
||||
// Check if CRS transformation is on, or else turn combobox off
|
||||
if ( QgisApp::instance()->mapCanvas()->mapRenderer()->hasCrsTransformEnabled() )
|
||||
{
|
||||
cmbEllipsoid->setEnabled( true );
|
||||
cmbEllipsoid->setToolTip( "" );
|
||||
}
|
||||
else
|
||||
{
|
||||
cmbEllipsoid->setEnabled( false );
|
||||
cmbEllipsoid->setToolTip( "Can only use ellipsoidal calculations when CRS transformation is enabled" );
|
||||
}
|
||||
|
||||
// Set the units for measuring
|
||||
QString myUnitsTxt = settings.value( "/qgis/measure/displayunits", "meters" ).toString();
|
||||
@ -933,7 +948,6 @@ void QgsOptions::saveOptions()
|
||||
{
|
||||
settings.setValue( "/qgis/measure/displayunits", "meters" );
|
||||
}
|
||||
settings.setValue( "/qgis/measure/ellipsoid", getEllipsoidAcronym( cmbEllipsoid->currentText() ) );
|
||||
|
||||
QString angleUnitString = "degrees";
|
||||
if ( mRadiansRadioButton->isChecked() )
|
||||
@ -1161,7 +1175,7 @@ void QgsOptions::getEllipsoidList()
|
||||
int myResult;
|
||||
|
||||
|
||||
cmbEllipsoid->addItem( ELLIPS_FLAT_DESC );
|
||||
cmbEllipsoid->addItem( tr( GEO_NONE_DESC ) );
|
||||
//check the db is available
|
||||
myResult = sqlite3_open_v2( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
|
||||
if ( myResult )
|
||||
@ -1194,7 +1208,8 @@ QString QgsOptions::getEllipsoidAcronym( QString theEllipsoidName )
|
||||
const char *myTail;
|
||||
sqlite3_stmt *myPreparedStatement;
|
||||
int myResult;
|
||||
QString myName( ELLIPS_FLAT );
|
||||
QString myName = GEO_NONE;
|
||||
|
||||
//check the db is available
|
||||
myResult = sqlite3_open_v2( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
|
||||
if ( myResult )
|
||||
@ -1226,7 +1241,9 @@ QString QgsOptions::getEllipsoidName( QString theEllipsoidAcronym )
|
||||
const char *myTail;
|
||||
sqlite3_stmt *myPreparedStatement;
|
||||
int myResult;
|
||||
QString myName( ELLIPS_FLAT_DESC );
|
||||
QString myName;
|
||||
|
||||
myName = tr( GEO_NONE_DESC );
|
||||
//check the db is available
|
||||
myResult = sqlite3_open_v2( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
|
||||
if ( myResult )
|
||||
|
@ -194,6 +194,8 @@ class QgsOptions : public QDialog, private Ui::QgsOptionsBase
|
||||
QgsCoordinateReferenceSystem mDefaultCrs;
|
||||
QgsCoordinateReferenceSystem mLayerDefaultCrs;
|
||||
bool mLoadedGdalDriverList;
|
||||
|
||||
static const char * GEO_NONE_DESC;
|
||||
};
|
||||
|
||||
#endif // #ifndef QGSOPTIONS_H
|
||||
|
@ -97,11 +97,14 @@ class CORE_EXPORT QGis
|
||||
DegreesDecimalMinutes = 2, // was 5
|
||||
};
|
||||
|
||||
// Provides the canonical name of the type value
|
||||
//! Provides the canonical name of the type value
|
||||
// Added in version 2.0
|
||||
static QString toLiteral( QGis::UnitType unit );
|
||||
// Converts from the canonical name to the type value
|
||||
//! Converts from the canonical name to the type value
|
||||
// Added in version 2.0
|
||||
static UnitType fromLiteral( QString literal, QGis::UnitType defaultType = UnknownUnit );
|
||||
// Provides translated version of the type value
|
||||
//! Provides translated version of the type value
|
||||
// Added in version 2.0
|
||||
static QString tr( QGis::UnitType unit );
|
||||
|
||||
//! User defined event types
|
||||
@ -197,6 +200,10 @@ const int LAT_PREFIX_LEN = 7;
|
||||
* or user (~/.qgis.qgis.db) defined projection. */
|
||||
const int USER_CRS_START_ID = 100000;
|
||||
|
||||
//! Constant that holds the string representation for "No ellips/No CRS"
|
||||
// Added in version 2.0
|
||||
const QString GEO_NONE = "NONE";
|
||||
|
||||
//
|
||||
// Constants for point symbols
|
||||
//
|
||||
|
@ -91,9 +91,9 @@ bool QgsDistanceArea::setEllipsoid( const QString& ellipsoid )
|
||||
int myResult;
|
||||
|
||||
// Shortcut if ellipsoid is none.
|
||||
if ( ellipsoid == "NONE" )
|
||||
if ( ellipsoid == GEO_NONE )
|
||||
{
|
||||
mEllipsoid = "NONE";
|
||||
mEllipsoid = GEO_NONE;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -337,14 +337,14 @@ double QgsDistanceArea::measureLine( const QList<QgsPoint>& points )
|
||||
|
||||
try
|
||||
{
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != "NONE" ) )
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != GEO_NONE ) )
|
||||
p1 = mCoordTransform->transform( points[0] );
|
||||
else
|
||||
p1 = points[0];
|
||||
|
||||
for ( QList<QgsPoint>::const_iterator i = points.begin(); i != points.end(); ++i )
|
||||
{
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != "NONE" ) )
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != GEO_NONE ) )
|
||||
{
|
||||
p2 = mCoordTransform->transform( *i );
|
||||
total += computeDistanceBearing( p1, p2 );
|
||||
@ -378,7 +378,7 @@ double QgsDistanceArea::measureLine( const QgsPoint& p1, const QgsPoint& p2 )
|
||||
QgsPoint pp1 = p1, pp2 = p2;
|
||||
|
||||
QgsDebugMsg( QString( "Measuring from %1 to %2" ).arg( p1.toString( 4 ) ).arg( p2.toString( 4 ) ) );
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != "NONE" ) )
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != GEO_NONE ) )
|
||||
{
|
||||
QgsDebugMsg( QString( "Ellipsoidal calculations is enabled, using ellipsoid %1" ).arg( mEllipsoid ) );
|
||||
QgsDebugMsg( QString( "From proj4 : %1" ).arg( mCoordTransform->sourceCrs().toProj4() ) );
|
||||
@ -447,7 +447,7 @@ unsigned char* QgsDistanceArea::measurePolygon( unsigned char* feature, double*
|
||||
|
||||
pnt = QgsPoint( x, y );
|
||||
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != "NONE" ) )
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != GEO_NONE ) )
|
||||
{
|
||||
pnt = mCoordTransform->transform( pnt );
|
||||
}
|
||||
@ -499,7 +499,7 @@ double QgsDistanceArea::measurePolygon( const QList<QgsPoint>& points )
|
||||
|
||||
try
|
||||
{
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != "NONE" ) )
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != GEO_NONE ) )
|
||||
{
|
||||
QList<QgsPoint> pts;
|
||||
for ( QList<QgsPoint>::const_iterator i = points.begin(); i != points.end(); ++i )
|
||||
@ -527,7 +527,7 @@ double QgsDistanceArea::bearing( const QgsPoint& p1, const QgsPoint& p2 )
|
||||
QgsPoint pp1 = p1, pp2 = p2;
|
||||
double bearing;
|
||||
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != "NONE" ) )
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != GEO_NONE ) )
|
||||
{
|
||||
pp1 = mCoordTransform->transform( p1 );
|
||||
pp2 = mCoordTransform->transform( p2 );
|
||||
@ -689,7 +689,7 @@ double QgsDistanceArea::computePolygonArea( const QList<QgsPoint>& points )
|
||||
double area;
|
||||
|
||||
QgsDebugMsgLevel( "Ellipsoid: " + mEllipsoid, 3 );
|
||||
if (( ! mEllipsoidalMode ) || ( mEllipsoid == "NONE" ) )
|
||||
if (( ! mEllipsoidalMode ) || ( mEllipsoid == GEO_NONE ) )
|
||||
{
|
||||
return computePolygonFlatArea( points );
|
||||
}
|
||||
@ -885,7 +885,7 @@ void QgsDistanceArea::convertMeasurement( double &measure, QGis::UnitType &measu
|
||||
// The parameters measure and measureUnits are in/out
|
||||
|
||||
if (( measureUnits == QGis::Degrees || measureUnits == QGis::Feet ) &&
|
||||
mEllipsoid != "NONE" &&
|
||||
mEllipsoid != GEO_NONE &&
|
||||
mEllipsoidalMode )
|
||||
{
|
||||
// Measuring on an ellipsoid returned meters. Force!
|
||||
|
@ -44,13 +44,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="mcbProjectionEnabled">
|
||||
<property name="text">
|
||||
<string>Ellipsoidal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
@ -98,13 +98,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QCheckBox" name="mcbProjectionEnabled">
|
||||
<property name="text">
|
||||
<string>Ellipsoidal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user