@@ -51,6 +51,7 @@ def _all_true():
5151 types = _add_multi (types )
5252 types = _add_z (types )
5353 types = _add_m (types )
54+ types .append ('NoGeometry' )
5455 return {t : True for t in types }
5556
5657
@@ -124,11 +125,12 @@ def _support_inplace_edit_tester(self, alg_name, expected):
124125 def test_support_in_place_edit (self ):
125126
126127 ALL = _all_true ()
128+ GEOMETRY_ONLY = {t : t != 'NoGeometry' for t in _all_true ().keys ()}
127129 NONE = _all_false ()
128130 LINESTRING_ONLY = {t : t .find ('LineString' ) >= 0 for t in _all_true ().keys ()}
129131 Z_ONLY = {t : t .find ('Z' ) > 0 for t in _all_true ().keys ()}
130132 M_ONLY = {t : t .rfind ('M' ) > 0 for t in _all_true ().keys ()}
131- NOT_M = {t : t .rfind ('M' ) < 1 for t in _all_true ().keys ()}
133+ NOT_M = {t : t .rfind ('M' ) < 1 and t != 'NoGeometry' for t in _all_true ().keys ()}
132134 POLYGON_ONLY = {t : t in ('Polygon' , 'MultiPolygon' ) for t in _all_true ().keys ()}
133135 MULTI_ONLY = {t : t .find ('Multi' ) == 0 for t in _all_true ().keys ()}
134136 SINGLE_ONLY = {t : t .find ('Multi' ) == - 1 for t in _all_true ().keys ()}
@@ -138,8 +140,8 @@ def test_support_in_place_edit(self):
138140
139141 self ._support_inplace_edit_tester ('native:smoothgeometry' , LINESTRING_AND_POLYGON_ONLY )
140142 self ._support_inplace_edit_tester ('native:parallellines' , LINESTRING_ONLY )
141- self ._support_inplace_edit_tester ('native:arrayfeatures' , ALL )
142- self ._support_inplace_edit_tester ('native:reprojectlayer' , ALL )
143+ self ._support_inplace_edit_tester ('native:arrayfeatures' , GEOMETRY_ONLY )
144+ self ._support_inplace_edit_tester ('native:reprojectlayer' , GEOMETRY_ONLY )
143145 self ._support_inplace_edit_tester ('qgis:densifygeometries' , LINESTRING_AND_POLYGON_ONLY )
144146 self ._support_inplace_edit_tester ('qgis:densifygeometriesgivenaninterval' , LINESTRING_AND_POLYGON_ONLY )
145147 self ._support_inplace_edit_tester ('native:setzfromraster' , Z_ONLY )
@@ -150,18 +152,25 @@ def test_support_in_place_edit(self):
150152 self ._support_inplace_edit_tester ('native:multiringconstantbuffer' , POLYGON_ONLY )
151153 self ._support_inplace_edit_tester ('native:orientedminimumboundingbox' , POLYGON_ONLY )
152154 self ._support_inplace_edit_tester ('qgis:orthogonalize' , LINESTRING_AND_POLYGON_ONLY )
153- self ._support_inplace_edit_tester ('native:removeduplicatevertices' , ALL )
154- self ._support_inplace_edit_tester ('native:rotatefeatures' , ALL )
155+ self ._support_inplace_edit_tester ('native:removeduplicatevertices' , GEOMETRY_ONLY )
156+ self ._support_inplace_edit_tester ('native:rotatefeatures' , GEOMETRY_ONLY )
155157 self ._support_inplace_edit_tester ('native:segmentizebymaxangle' , NONE )
156158 self ._support_inplace_edit_tester ('native:segmentizebymaxdistance' , NONE )
157159 self ._support_inplace_edit_tester ('native:setmfromraster' , M_ONLY )
158160 self ._support_inplace_edit_tester ('native:simplifygeometries' , LINESTRING_AND_POLYGON_ONLY )
159- self ._support_inplace_edit_tester ('native:snappointstogrid' , ALL )
160- self ._support_inplace_edit_tester ('native:multiparttosingleparts' , ALL )
161+ self ._support_inplace_edit_tester ('native:snappointstogrid' , GEOMETRY_ONLY )
162+ self ._support_inplace_edit_tester ('native:multiparttosingleparts' , GEOMETRY_ONLY )
161163 self ._support_inplace_edit_tester ('native:promotetomulti' , MULTI_ONLY )
162- self ._support_inplace_edit_tester ('native:subdivide' , ALL )
163- self ._support_inplace_edit_tester ('native:translategeometry' , ALL )
164- self ._support_inplace_edit_tester ('native:swapxy' , ALL )
164+ self ._support_inplace_edit_tester ('native:subdivide' , GEOMETRY_ONLY )
165+ self ._support_inplace_edit_tester ('native:translategeometry' , GEOMETRY_ONLY )
166+ self ._support_inplace_edit_tester ('native:swapxy' , GEOMETRY_ONLY )
167+ self ._support_inplace_edit_tester ('qgis:linestopolygons' , NONE )
168+ self ._support_inplace_edit_tester ('qgis:polygonstolines' , NONE )
169+ self ._support_inplace_edit_tester ('native:boundary' , GEOMETRY_ONLY )
170+ self ._support_inplace_edit_tester ('native:clip' , GEOMETRY_ONLY )
171+ self ._support_inplace_edit_tester ('native:difference' , GEOMETRY_ONLY )
172+ self ._support_inplace_edit_tester ('native:dropgeometries' , ALL )
173+ self ._support_inplace_edit_tester ('native:splitwithlines' , LINESTRING_AND_POLYGON_ONLY )
165174
166175 def _make_compatible_tester (self , feature_wkt , layer_wkb_name , attrs = [1 ]):
167176 layer = self ._make_layer (layer_wkb_name )
0 commit comments