@@ -716,6 +716,12 @@ Returns a simplified version of this geometry using a specified tolerance value
716
716
QgsGeometry centroid() const;
717
717
%Docstring
718
718
Returns the center of mass of a geometry.
719
+
720
+ If the input is a NULL geometry, the output will also be a NULL geometry.
721
+
722
+ If an error was encountered while creating the result, more information can be retrieved
723
+ by calling `error()` on the returned geometry.
724
+
719
725
.. note::
720
726
721
727
for line based geometries, the center point of the line is returned,
@@ -730,6 +736,12 @@ Returns a simplified version of this geometry using a specified tolerance value
730
736
Returns a point guaranteed to lie on the surface of a geometry. While the centroid()
731
737
of a geometry may be located outside of the geometry itself (e.g., for concave shapes),
732
738
the point on surface will always be inside the geometry.
739
+
740
+ If the input is a NULL geometry, the output will also be a NULL geometry.
741
+
742
+ If an error was encountered while creating the result, more information can be retrieved
743
+ by calling `error()` on the returned geometry.
744
+
733
745
.. seealso:: centroid()
734
746
.. seealso:: poleOfInaccessibility()
735
747
:rtype: QgsGeometry
@@ -752,7 +764,12 @@ Returns a simplified version of this geometry using a specified tolerance value
752
764
753
765
QgsGeometry convexHull() const;
754
766
%Docstring
755
- Returns the smallest convex polygon that contains all the points in the geometry.
767
+ Returns the smallest convex polygon that contains all the points in the geometry.
768
+
769
+ If the input is a NULL geometry, the output will also be a NULL geometry.
770
+
771
+ If an error was encountered while creating the result, more information can be retrieved
772
+ by calling `error()` on the returned geometry.
756
773
:rtype: QgsGeometry
757
774
%End
758
775
@@ -799,14 +816,25 @@ Returns the smallest convex polygon that contains all the points in the geometry
799
816
800
817
Curved geometries will be segmentized before subdivision.
801
818
819
+ If the input is a NULL geometry, the output will also be a NULL geometry.
820
+
821
+ If an error was encountered while creating the result, more information can be retrieved
822
+ by calling `error()` on the returned geometry.
823
+
802
824
.. versionadded:: 3.0
803
825
:rtype: QgsGeometry
804
826
%End
805
827
806
828
QgsGeometry interpolate( double distance ) const;
807
829
%Docstring
808
- Return interpolated point on line at distance
809
- .. versionadded:: 1.9
830
+ Return interpolated point on line at distance.
831
+
832
+ If the input is a NULL geometry, the output will also be a NULL geometry.
833
+
834
+ If an error was encountered while creating the result, more information can be retrieved
835
+ by calling `error()` on the returned geometry.
836
+
837
+ .. versionadded:: 2.0
810
838
.. seealso:: lineLocatePoint()
811
839
:rtype: QgsGeometry
812
840
%End
@@ -841,7 +869,12 @@ Returns the smallest convex polygon that contains all the points in the geometry
841
869
842
870
QgsGeometry intersection( const QgsGeometry &geometry ) const;
843
871
%Docstring
844
- Returns a geometry representing the points shared by this geometry and other.
872
+ Returns a geometry representing the points shared by this geometry and other.
873
+
874
+ If the input is a NULL geometry, the output will also be a NULL geometry.
875
+
876
+ If an error was encountered while creating the result, more information can be retrieved
877
+ by calling `error()` on the returned geometry.
845
878
:rtype: QgsGeometry
846
879
%End
847
880
@@ -859,6 +892,12 @@ Returns a geometry representing the points shared by this geometry and other.
859
892
%Docstring
860
893
Returns a geometry representing all the points in this geometry and other (a
861
894
union geometry operation).
895
+
896
+ If the input is a NULL geometry, the output will also be a NULL geometry.
897
+
898
+ If an error was encountered while creating the result, more information can be retrieved
899
+ by calling `error()` on the returned geometry.
900
+
862
901
.. note::
863
902
864
903
this operation is not called union since its a reserved word in C++.
@@ -878,13 +917,23 @@ Returns a geometry representing the points shared by this geometry and other.
878
917
879
918
QgsGeometry difference( const QgsGeometry &geometry ) const;
880
919
%Docstring
881
- Returns a geometry representing the points making up this geometry that do not make up other.
920
+ Returns a geometry representing the points making up this geometry that do not make up other.
921
+
922
+ If the input is a NULL geometry, the output will also be a NULL geometry.
923
+
924
+ If an error was encountered while creating the result, more information can be retrieved
925
+ by calling `error()` on the returned geometry.
882
926
:rtype: QgsGeometry
883
927
%End
884
928
885
929
QgsGeometry symDifference( const QgsGeometry &geometry ) const;
886
930
%Docstring
887
- Returns a geometry representing the points making up this geometry that do not make up other.
931
+ Returns a geometry representing the points making up this geometry that do not make up other.
932
+
933
+ If the input is a NULL geometry, the output will also be a NULL geometry.
934
+
935
+ If an error was encountered while creating the result, more information can be retrieved
936
+ by calling `error()` on the returned geometry.
888
937
:rtype: QgsGeometry
889
938
%End
890
939
@@ -1184,6 +1233,15 @@ Ring 0 is outer ring and can't be deleted.
1184
1233
:rtype: int
1185
1234
%End
1186
1235
1236
+ QString error() const;
1237
+ %Docstring
1238
+ Returns an error string referring to an error that was produced
1239
+ when this geometry was created.
1240
+
1241
+ .. versionadded:: 3.0
1242
+ :rtype: str
1243
+ %End
1244
+
1187
1245
1188
1246
static QgsGeometry fromQPointF( QPointF point );
1189
1247
%Docstring
0 commit comments