[Qgis-developer] copy/paste: Z dimension in geometry
denis.rouzaud at gmail.com
Thu Mar 13 00:36:50 PDT 2014
Apprently, for the features causing the problem in the dxf layer,
geometry().type() = 1
geometry().wkbType() = -2147483646
On 13. 03. 14 08:16, Denis Rouzaud wrote:
> 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
> Best regards,
More information about the Qgis-developer