#1245 closed bug (fixed)
QgsFeature.setGeometry() does not work properly for MultiPolygons
Reported by: | cfarmer | Owned by: | jef |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | |
Component: | Vectors | Version: | Trunk |
Keywords: | setGeometry(), QgsFeature, MultiPolygon | Cc: | |
Must Fix for Release: | Yes | Platform: | Linux |
Platform Version: | Awaiting user input: | no |
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)
Attachments (1)
Change History (4)
by , 16 years ago
Attachment: | MultiPoly.zip added |
---|
comment:1 by , 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).
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Shapefile containing a single polygon and a multipolygon