File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -1109,15 +1109,21 @@ Ring 0 is outer ring and can't be deleted.
1109
1109
%Docstring
1110
1110
Attempts to make an invalid geometry valid without losing vertices.
1111
1111
1112
- .. note::
1113
-
1114
- Ported from PostGIS ST_MakeValid() and it should return equivalent results.
1115
1112
Already-valid geometries are returned without further intervention.
1116
1113
In case of full or partial dimensional collapses, the output geometry may be a collection
1117
1114
of lower-to-equal dimension geometries or a geometry of lower dimension.
1118
1115
Single polygons may become multi-geometries in case of self-intersections.
1119
1116
It preserves Z values, but M values will be dropped.
1117
+
1118
+ If an error was encountered during the process, more information can be retrieved
1119
+ by calling `error()` on the returned geometry.
1120
+
1120
1121
:return: new valid QgsGeometry or null geometry on error
1122
+
1123
+ .. note::
1124
+
1125
+ Ported from PostGIS ST_MakeValid() and it should return equivalent results.
1126
+
1121
1127
.. versionadded:: 3.0
1122
1128
:rtype: QgsGeometry
1123
1129
%End
Original file line number Diff line number Diff line change @@ -2012,8 +2012,7 @@ QgsGeometry QgsGeometry::makeValid()
2012
2012
if ( !d->geometry )
2013
2013
return QgsGeometry ();
2014
2014
2015
- QString errorMsg;
2016
- QgsAbstractGeometry *g = _qgis_lwgeom_make_valid ( d->geometry , errorMsg );
2015
+ QgsAbstractGeometry *g = _qgis_lwgeom_make_valid ( d->geometry , d->error );
2017
2016
2018
2017
return QgsGeometry ( g );
2019
2018
}
Original file line number Diff line number Diff line change @@ -993,13 +993,19 @@ class CORE_EXPORT QgsGeometry
993
993
/* *
994
994
* Attempts to make an invalid geometry valid without losing vertices.
995
995
*
996
- * \note Ported from PostGIS ST_MakeValid() and it should return equivalent results.
997
996
* Already-valid geometries are returned without further intervention.
998
997
* In case of full or partial dimensional collapses, the output geometry may be a collection
999
998
* of lower-to-equal dimension geometries or a geometry of lower dimension.
1000
999
* Single polygons may become multi-geometries in case of self-intersections.
1001
1000
* It preserves Z values, but M values will be dropped.
1001
+ *
1002
+ * If an error was encountered during the process, more information can be retrieved
1003
+ * by calling `error()` on the returned geometry.
1004
+ *
1002
1005
* \returns new valid QgsGeometry or null geometry on error
1006
+ *
1007
+ * \note Ported from PostGIS ST_MakeValid() and it should return equivalent results.
1008
+ *
1003
1009
* \since QGIS 3.0
1004
1010
*/
1005
1011
QgsGeometry makeValid ();
You can’t perform that action at this time.
0 commit comments