Allows setting symbols other map item sizes to Map Units in Meters. This allows setting the size always in meters, regardless of what the underlying map units are (e.g. they can be it geographic degrees). The size in meters is calculated based on the current project ellipsoid setting and a projection of the distances in meters at the center of the current map extent.
- setEllipsoidalMode() was removed. Ellipsoidal calculations are
now enabled whenever a valid ellipsoid() has been set. Set the
ellipsoid to 'NONE' to disable ellipsoidal calculations.
- ellipsoidalEnabled() was removed. Ellipsoidal calculations
are now enabled whenever a valid ellipsoid() is set. Check
willUseEllipsoid() to determine whether ellipsoidal
calculations will be performed.
- sourceCrs() and setSourceCrs() now always take and return
QgsCoordinateReferenceSystem objects. All string/ID based CRS
methods were removed.
- geographic() was removed. This was only used internally
in one place, so was replaced with sourceCrs().isGeographic() instead.
- some largely overlapping measurement functions were consolidated
There's no complex member variables here - the default implementations
should be fine (actually faster, since they won't require
recalculation of the derived parameters)
This change consolidates more unit handling and conversion into
QgsUnitTypes.
Additionally, UnknownUnit was renamed to UnknownDistanceUnit.
All methods which accepted QGis::UnitType parameters have been
updated to take QgsUnitTypes::DistanceUnit instead.
ALso remove the unit handling methods toLiteral, fromLiteral, tr,
fromTr, and fromUnitToUnitFactor from QGis. Their corresponding
counterparts in QgsUnitTypes should be used instead.
ton of available area units (eg m2, km2, mi2, ft2, yd2, ha, ac,
etc)
Adds a new option in both the QGIS setting and project properties to
set the units used for area measurements. Just like the distance
setting, this defaults to the units set in QGIS options, but can
then be overridden for specific projects.
The setting is respected for area calculations in:
- Attribute table field update bar
- Field calculator calculations
- Identify tool derived length and perimeter values
Also adds unit tests to ensure that area calculated by attribute table
update bar, field calculator and identify tool are consistent wrt
ellipsoidal calculations and area units.
TODO: make measure tool respect area setting
(refs #13209, #4252 and fixes#12939, #2402, #4857)
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
- update methods of existing classes
- add comment to methods missing in the sip bindings
- split up collective sip files into single files and use
same directory structure in python/ as in src/
- add a lot of missing classes (some might not make sense because of
missing python methods in those classes)
- remove some non-existing methods from the header files
- add scripts/sipdiff
- replace some usages of std::vector and std::set with QVector/QSet
- more API cleanups
- single click (instead of drag) to select a feature (fixes#1154)
- fixes for topological editing
git-svn-id: http://svn.osgeo.org/qgis/trunk@9471 c8812cc2-4d05-0410-92ff-de0c093fc19c