Bug report #1245

QgsFeature.setGeometry() does not work properly for MultiPolygons

Added by cfarmer - over 16 years ago. Updated over 15 years ago.

Status:Closed
Priority:Low
Assignee:Jürgen Fischer
Category:Vectors
Affected QGIS version: Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11305

Description

Using the following test, I get an unknown wkbType:

geom = feat.geometry()
multi_geom = QgsGeometry()
if geom.isMultipart():
multi_geom = geom.asMultiPolygon()
temp_geom = QgsGeometry.fromMultiPolygon(multi_geom)
#temp_geom has a wkbType of 6 (MultiPolygon)
outfeat.setGeometry(temp_geom)
check_geom = outfeat.geometry()
#check_geom has a wkbType of 7 (Unknown)

MultiPoly.zip - Shapefile containing a single polygon and a multipolygon (1.79 KB) cfarmer -, 2008-08-24 07:57 AM

Associated revisions

Revision 53316310
Added by Jürgen Fischer over 16 years ago

fix #1245

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9154 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 07cd0989
Added by Jürgen Fischer over 16 years ago

fix #1245

git-svn-id: http://svn.osgeo.org/qgis/trunk@9154 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 55493aa6
Added by Jürgen Fischer over 16 years ago

fix #1245 (take two)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9155 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision ed45af84
Added by Jürgen Fischer over 16 years ago

fix #1245 (take two)

git-svn-id: http://svn.osgeo.org/qgis/trunk@9155 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by Jürgen Fischer over 16 years ago

You're running GEOS 2.2.3. GEOSGeom_clone() doesn't seem to work on multipolygons there (QgsGeometry contained a work-around for that earlier).

Please test and close the bug if the problem is solved (I current don't have a machine with GEOS 2 and Qt >=4.3).

#2 Updated by cfarmer - over 16 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

#3 Updated by Anonymous over 15 years ago

Milestone Version 1.0.0 deleted

Also available in: Atom PDF