qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.52k stars 2.99k forks source link

Batch Clip with Processing doesnt work with M Polygon #22880

Closed qgib closed 5 years ago

qgib commented 8 years ago

Author Name: Nicolas Rochard (Nicolas Rochard) Original Redmine Issue: 14929 Affected QGIS version: 2.14.3 Redmine category:processing/qgis


Hi,

When i try to use processing in batch mode with QGIS clip function. It's not working error message said :

"unsupported geometry type"

It's from IGN BdTopo and it's polygon with M dimension. See detail on [[http://paste.opensuse.org/92344906]] Doesn’t work in QGIS 2.14.3 But work with QGIS 2.14.2

Though it was due to GDAL : https://trac.osgeo.org/gdal/wiki/rfc61_support_for_measured_geometries So build back 2.0.2 instead of using lastest 2.1 but problem still the same.


qgib commented 8 years ago

Author Name: Even Rouault (@rouault)


The problem is due to the presence of 2.5D geometries (nothing to do with M), so the title should be changed

In 2.14, the message is generic: https://github.com/qgis/QGIS/blob/release-2_14/python/plugins/processing/algs/qgis/Clip.py#L63 ( Input layer has unsupported geometry type ). In master it has been made more specific : https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/Clip.py#L72 ( Input layer does not support 2.5D type geometry )

qgib commented 8 years ago

Author Name: Nicolas Rochard (Nicolas Rochard)


This is a testing sample data.



qgib commented 8 years ago

Author Name: Alexander Bruy (@alexbruy)


qgib commented 8 years ago

Author Name: Nicolas Rochard (Nicolas Rochard)


Would like to be more precise. I've tested on 2.10 and its work perfectly without error


qgib commented 8 years ago

Author Name: Nicolas Rochard (Nicolas Rochard)


After a feedback with René-Luc D'Hont from 3Liz,

It work again by comment line 64 to 66 in /usr/share/qgis/python/plugins/processing/algs/qgis/Clip.py

        #if geomType in GEOM_25D:
        #    raise GeoAlgorithmExecutionException(
        #        self.tr('Input layer has unsupported geometry type {}').format(geomType))

Export is still Geometry: 3D Polygon so why there is a testing condition in the code ?

qgib commented 8 years ago

Author Name: René-Luc ReLuc (@rldhont)


This restriction has been added in d4e400a

Why this restriction? A problem with some GEOS version ?

qgib commented 8 years ago

Author Name: Alexander Bruy (@alexbruy)


Fixed in changeset "0553f7b33b4a3294f9a1cfb24e8c238f9211503d".