'Merge selected features' tool creates invalid MULTIPOLYGON instead of POLYGON geometry #14960
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Digitizing
Related to feature digitizing map tools or functionality
Milestone
Author Name: Ivan Mincik (Ivan Mincik)
Original Redmine Issue: 5224
Affected QGIS version: master
Redmine category:digitising
In some cases, 'Merge selected feature' tool creates invalid MULTIPOLYGON instead of possible single POLYGON geometry.
This makes a problem in case, when layer supports only single POLYGON geometries. This problem can be avoided, when all nodes of one of the features are moved and returned back to the same place using 'Node tool' before merge.
Example data is attached. I also did test with merging the geometries using PostGIS - correct single polygon was returned.
SELECT
ST_GeometryType(
ST_Union(
ST_GeomFromText('POLYGON((-417988.970000 -1228096.180000,-417983.190000 -1228094.430000,-417982.733626 -1228096.512726,-417984.489917 -1228097.460187,-417988.330000 -1228098.540000,-417988.970000 -1228096.180000))'),
ST_GeomFromText('POLYGON((-417984.489917 -1228097.460187,-417982.733626 -1228096.512726,-417982.640000 -1228096.940000,-417984.489917 -1228097.460187))')
)
)
st_geometrytype
ST_Polygon
(1 row)
Qgis: latest release-1_7 branch
OS: Debian Squeeze
Geos: 3.2.0-1
The text was updated successfully, but these errors were encountered: