Hi all,

I recently modified the copy/paste mechanism in QGIS so geometries are automatically transformed to the destination layer geometry type.

Now, I have a problem when I copy features from a dxf to a postgis layer.

I get a PostGIS error saying the geometry has Z dimension while the layer has not.

This happens if no transformation occurs (e.g. both source and destination layers are single line) since the QgsGeometry::convertToType returns a copy of the given geometry.

Now, is there a better solution than returning QgsGeometry::fromPolyline(geom.asPolyline()) ?

Do you have any idea on how to solve this properly in the copy/paste mechanism in QGIS?

Or would it be an option: remove Z values from geometries in selected features?

Best regards,

Denis
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to