Skip to content
Permalink
Browse files
Merge pull request #4367 from nyalldawson/distance_area_api
Cleanup QgsDistanceArea API and sipify, add cache for ellipsoid lookup
  • Loading branch information
nyalldawson committed Apr 18, 2017
2 parents 7b202ed + 05b737c commit 0c1f97c4384574261c02d178375a70cfb4cb3661
Showing with 1,133 additions and 980 deletions.
  1. +7 −0 doc/api_break.dox
  2. +0 −1 python/auto_sip.blacklist
  3. +1 −0 python/core/core.sip
  4. +1 −1 python/core/qgscoordinatereferencesystem.sip
  5. +272 −248 python/core/qgsdistancearea.sip
  6. +104 −0 python/core/qgsellipsoidutils.sip
  7. +0 −1 python/plugins/processing/algs/qgis/FieldsCalculator.py
  8. +0 −1 python/plugins/processing/algs/qgis/FieldsMapper.py
  9. +3 −2 python/plugins/processing/algs/qgis/HubDistanceLines.py
  10. +3 −2 python/plugins/processing/algs/qgis/HubDistancePoints.py
  11. +0 −1 python/plugins/processing/tools/vector.py
  12. +6 −0 scripts/sipify.pl
  13. +0 −1 src/analysis/network/qgsgraphbuilderinterface.h
  14. +3 −2 src/analysis/vector/qgstransectsample.cpp
  15. +0 −1 src/app/qgisapp.cpp
  16. +0 −1 src/app/qgisappinterface.cpp
  17. +0 −1 src/app/qgsattributeactionpropertiesdialog.cpp
  18. +0 −3 src/app/qgsattributetabledialog.cpp
  19. +0 −2 src/app/qgsdiagramproperties.cpp
  20. +0 −1 src/app/qgsfeatureaction.cpp
  21. +0 −2 src/app/qgsfieldcalculator.cpp
  22. +0 −1 src/app/qgslabelinggui.cpp
  23. +0 −1 src/app/qgsmaptoolmeasureangle.cpp
  24. +0 −1 src/app/qgsmeasuredialog.cpp
  25. +9 −54 src/app/qgsprojectproperties.cpp
  26. +4 −2 src/core/CMakeLists.txt
  27. +2 −3 src/core/composer/qgscomposerhtml.cpp
  28. +2 −3 src/core/composer/qgscomposerlabel.cpp
  29. +2 −4 src/core/composer/qgscomposerscalebar.cpp
  30. +1 −1 src/core/qgscoordinatereferencesystem.h
  31. +45 −361 src/core/qgsdistancearea.cpp
  32. +109 −166 src/core/qgsdistancearea.h
  33. +248 −0 src/core/qgsellipsoidutils.cpp
  34. +104 −0 src/core/qgsellipsoidutils.h
  35. +0 −1 src/core/qgsexpression.cpp
  36. +2 −4 src/core/qgsvectorlayerfeatureiterator.cpp
  37. +2 −1 src/core/qgsvectorlayerfeatureiterator.h
  38. +0 −1 src/gui/qgsmaptoolidentify.cpp
  39. +2 −0 tests/scripts/sipifyheader.expected.sip
  40. +2 −0 tests/scripts/sipifyheader.h
  41. +91 −44 tests/src/core/testqgsdistancearea.cpp
  42. +1 −2 tests/src/core/testqgsexpression.cpp
  43. +4 −4 tests/src/core/testqgspointlocator.cpp
  44. +1 −0 tests/src/python/CMakeLists.txt
  45. +18 −55 tests/src/python/test_qgsdistancearea.py
  46. +84 −0 tests/src/python/test_qgsellipsoidutils.py
@@ -951,7 +951,14 @@ QgsDial {#qgis_api_break_3_0_QgsDial}
QgsDistanceArea {#qgis_api_break_3_0_QgsDistanceArea}
---------------

- 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() now returns a QgsCoordinateReferenceSystem instead of the crs ID.
- setSourceCrs() now requires a QgsCoordinateReferenceSystem instead of crs ID.
- setSourceAuthId() was removed. Use setSourceCrs() instead.
- geographic() was removed. Check sourceCrs().isGeographic() instead.
- measure() has been removed. Use measureArea() or measureLength() instead.
- textUnit() was removed. Use formatDistance() or formatArea() instead.
- convertMeasurement was removed. Use QgsUnitTypes for conversion instead.
@@ -19,7 +19,6 @@ core/qgsdatasourceuri.sip
core/qgsdatetimestatisticalsummary.sip
core/qgsdatumtransformstore.sip
core/qgsdbfilterproxymodel.sip
core/qgsdistancearea.sip
core/qgseditformconfig.sip
core/qgseditorwidgetsetup.sip
core/qgserror.sip
@@ -47,6 +47,7 @@
%Include qgsdistancearea.sip
%Include qgseditformconfig.sip
%Include qgseditorwidgetsetup.sip
%Include qgsellipsoidutils.sip
%Include qgserror.sip
%Include qgsexpression.sip
%Include qgsexpressioncontext.sip
@@ -181,7 +181,7 @@ class QgsCoordinateReferenceSystem
* @param type One of the types described in CrsType
*/
// TODO QGIS 3: remove type and always use EPSG code
QgsCoordinateReferenceSystem( const long id, CrsType type = PostgisCrsId );
explicit QgsCoordinateReferenceSystem( const long id, CrsType type = PostgisCrsId );

operator QVariant() const;
static QList< long > validSrsIds();
Loading

0 comments on commit 0c1f97c

Please sign in to comment.