From 8e1a19a9cc1bbc333a10725bb67346c6cd1d92eb Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Fri, 4 Sep 2015 17:23:41 +0200 Subject: [PATCH] Documentation --- python/core/geometry/qgscircularstringv2.sip | 1 + python/core/geometry/qgscompoundcurvev2.sip | 1 + python/core/geometry/qgscurvepolygonv2.sip | 1 + python/core/geometry/qgsgeometrycollectionv2.sip | 1 + python/core/geometry/qgslinestringv2.sip | 1 + python/core/geometry/qgspointv2.sip | 4 +++- python/core/qgsrendercontext.sip | 7 +++++++ src/core/geometry/qgsabstractgeometryv2.h | 1 + src/core/geometry/qgscircularstringv2.h | 1 + src/core/geometry/qgscompoundcurvev2.h | 1 + src/core/geometry/qgscurvepolygonv2.h | 1 + src/core/geometry/qgsgeometrycollectionv2.h | 1 + src/core/geometry/qgslinestringv2.h | 1 + src/core/geometry/qgspointv2.h | 4 +++- 14 files changed, 24 insertions(+), 2 deletions(-) diff --git a/python/core/geometry/qgscircularstringv2.sip b/python/core/geometry/qgscircularstringv2.sip index 73c619b7e63a..162a94445805 100644 --- a/python/core/geometry/qgscircularstringv2.sip +++ b/python/core/geometry/qgscircularstringv2.sip @@ -56,6 +56,7 @@ class QgsCircularStringV2: public QgsCurveV2 bool hasCurvedSegments() const; /** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments. + @param vertex the vertex id @return rotation in radians, clockwise from north*/ double vertexAngle( const QgsVertexId& vertex ) const; diff --git a/python/core/geometry/qgscompoundcurvev2.sip b/python/core/geometry/qgscompoundcurvev2.sip index 57fc8de84205..48591e0ac995 100644 --- a/python/core/geometry/qgscompoundcurvev2.sip +++ b/python/core/geometry/qgscompoundcurvev2.sip @@ -62,6 +62,7 @@ class QgsCompoundCurveV2: public QgsCurveV2 bool hasCurvedSegments() const; /** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments. + @param vertex the vertex id @return rotation in radians, clockwise from north*/ double vertexAngle( const QgsVertexId& vertex ) const; }; diff --git a/python/core/geometry/qgscurvepolygonv2.sip b/python/core/geometry/qgscurvepolygonv2.sip index dbd70636ab85..ea64b46e550a 100644 --- a/python/core/geometry/qgscurvepolygonv2.sip +++ b/python/core/geometry/qgscurvepolygonv2.sip @@ -64,6 +64,7 @@ class QgsCurvePolygonV2: public QgsSurfaceV2 QgsAbstractGeometryV2* segmentize() const /Factory/; /** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments. + @param vertex the vertex id @return rotation in radians, clockwise from north*/ double vertexAngle( const QgsVertexId& vertex ) const; }; diff --git a/python/core/geometry/qgsgeometrycollectionv2.sip b/python/core/geometry/qgsgeometrycollectionv2.sip index 9ae57756f26d..40e7c2b4e7a8 100644 --- a/python/core/geometry/qgsgeometrycollectionv2.sip +++ b/python/core/geometry/qgsgeometrycollectionv2.sip @@ -53,6 +53,7 @@ class QgsGeometryCollectionV2: public QgsAbstractGeometryV2 bool hasCurvedSegments() const; /** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments. + @param vertex the vertex id @return rotation in radians, clockwise from north*/ double vertexAngle( const QgsVertexId& vertex ) const; }; diff --git a/python/core/geometry/qgslinestringv2.sip b/python/core/geometry/qgslinestringv2.sip index b217e341be73..4ae5d10dfb39 100644 --- a/python/core/geometry/qgslinestringv2.sip +++ b/python/core/geometry/qgslinestringv2.sip @@ -57,6 +57,7 @@ class QgsLineStringV2: public QgsCurveV2 void sumUpArea( double& sum ) const; /** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments. + @param vertex the vertex id @return rotation in radians, clockwise from north*/ double vertexAngle( const QgsVertexId& vertex ) const; }; diff --git a/python/core/geometry/qgspointv2.sip b/python/core/geometry/qgspointv2.sip index adbb146fddf6..d11681176374 100644 --- a/python/core/geometry/qgspointv2.sip +++ b/python/core/geometry/qgspointv2.sip @@ -56,6 +56,8 @@ class QgsPointV2: public QgsAbstractGeometryV2 double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const; bool nextVertex( QgsVertexId& id, QgsPointV2& vertex ) const; - /** Angle undefined. Always returns 0.0*/ + /** Angle undefined. Always returns 0.0 + @param vertex the vertex id + @return 0.0*/ double vertexAngle( const QgsVertexId& vertex ) const; }; diff --git a/python/core/qgsrendercontext.sip b/python/core/qgsrendercontext.sip index 564c43bc0f40..b55de60a8f40 100644 --- a/python/core/qgsrendercontext.sip +++ b/python/core/qgsrendercontext.sip @@ -85,4 +85,11 @@ class QgsRenderContext //! Added in QGIS v2.4 const QgsVectorSimplifyMethod& vectorSimplifyMethod() const; void setVectorSimplifyMethod( const QgsVectorSimplifyMethod& simplifyMethod ); + + /** Returns pointer to the unsegmentized geometry + @return the geometry*/ + const QgsAbstractGeometryV2* geometry() const; + /** Sets pointer to original (unsegmentized) geometry + @geometry the geometry*/ + void setGeometry( const QgsAbstractGeometryV2* geometry ); }; diff --git a/src/core/geometry/qgsabstractgeometryv2.h b/src/core/geometry/qgsabstractgeometryv2.h index 2f5261422c79..9d4cbc68c974 100644 --- a/src/core/geometry/qgsabstractgeometryv2.h +++ b/src/core/geometry/qgsabstractgeometryv2.h @@ -318,6 +318,7 @@ class CORE_EXPORT QgsAbstractGeometryV2 virtual QgsAbstractGeometryV2* segmentize() const { return clone(); } /** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments. + @param vertex the vertex id @return rotation in radians, clockwise from north*/ virtual double vertexAngle( const QgsVertexId& vertex ) const = 0; diff --git a/src/core/geometry/qgscircularstringv2.h b/src/core/geometry/qgscircularstringv2.h index 11021ed4f730..303b904490eb 100644 --- a/src/core/geometry/qgscircularstringv2.h +++ b/src/core/geometry/qgscircularstringv2.h @@ -92,6 +92,7 @@ class CORE_EXPORT QgsCircularStringV2: public QgsCurveV2 bool hasCurvedSegments() const override { return true; } /** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments. + @param vertex the vertex id @return rotation in radians, clockwise from north*/ double vertexAngle( const QgsVertexId& vertex ) const override; diff --git a/src/core/geometry/qgscompoundcurvev2.h b/src/core/geometry/qgscompoundcurvev2.h index 70cfa2181df8..d0b36fee9d25 100644 --- a/src/core/geometry/qgscompoundcurvev2.h +++ b/src/core/geometry/qgscompoundcurvev2.h @@ -105,6 +105,7 @@ class CORE_EXPORT QgsCompoundCurveV2: public QgsCurveV2 bool hasCurvedSegments() const override; /** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments. + @param vertex the vertex id @return rotation in radians, clockwise from north*/ double vertexAngle( const QgsVertexId& vertex ) const override; diff --git a/src/core/geometry/qgscurvepolygonv2.h b/src/core/geometry/qgscurvepolygonv2.h index 9d4879eedad0..ee2c14bcd846 100644 --- a/src/core/geometry/qgscurvepolygonv2.h +++ b/src/core/geometry/qgscurvepolygonv2.h @@ -95,6 +95,7 @@ class CORE_EXPORT QgsCurvePolygonV2: public QgsSurfaceV2 QgsAbstractGeometryV2* segmentize() const override; /** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments. + @param vertex the vertex id @return rotation in radians, clockwise from north*/ double vertexAngle( const QgsVertexId& vertex ) const override; diff --git a/src/core/geometry/qgsgeometrycollectionv2.h b/src/core/geometry/qgsgeometrycollectionv2.h index 1978497375e1..59ed1be217fb 100644 --- a/src/core/geometry/qgsgeometrycollectionv2.h +++ b/src/core/geometry/qgsgeometrycollectionv2.h @@ -103,6 +103,7 @@ class CORE_EXPORT QgsGeometryCollectionV2: public QgsAbstractGeometryV2 QgsAbstractGeometryV2* segmentize() const override; /** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments. + @param vertex the vertex id @return rotation in radians, clockwise from north*/ double vertexAngle( const QgsVertexId& vertex ) const override; diff --git a/src/core/geometry/qgslinestringv2.h b/src/core/geometry/qgslinestringv2.h index 37adff84dab2..1425880ef57d 100644 --- a/src/core/geometry/qgslinestringv2.h +++ b/src/core/geometry/qgslinestringv2.h @@ -91,6 +91,7 @@ class CORE_EXPORT QgsLineStringV2: public QgsCurveV2 void close(); /** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments. + @param vertex the vertex id @return rotation in radians, clockwise from north*/ double vertexAngle( const QgsVertexId& vertex ) const override; diff --git a/src/core/geometry/qgspointv2.h b/src/core/geometry/qgspointv2.h index 167cdf71ef15..8982b6f61e1f 100644 --- a/src/core/geometry/qgspointv2.h +++ b/src/core/geometry/qgspointv2.h @@ -85,7 +85,9 @@ class CORE_EXPORT QgsPointV2: public QgsAbstractGeometryV2 double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const override; bool nextVertex( QgsVertexId& id, QgsPointV2& vertex ) const override; - /** Angle undefined. Always returns 0.0*/ + /** Angle undefined. Always returns 0.0 + @param vertex the vertex id + @return 0.0*/ double vertexAngle( const QgsVertexId& vertex ) const override { Q_UNUSED( vertex ); return 0.0; } private: