Skip to content

Commit

Permalink
Merge pull request #4367 from nyalldawson/distance_area_api
Browse files Browse the repository at this point in the history
Cleanup QgsDistanceArea API and sipify, add cache for ellipsoid lookup
  • Loading branch information
nyalldawson authored Apr 18, 2017
2 parents 7b202ed + 05b737c commit 0c1f97c
Show file tree
Hide file tree
Showing 46 changed files with 1,133 additions and 980 deletions.
7 changes: 7 additions & 0 deletions doc/api_break.dox
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion python/auto_sip.blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions python/core/core.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgscoordinatereferencesystem.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading

0 comments on commit 0c1f97c

Please sign in to comment.