[QGIS-Developer] QgsField, precision, export

Martin Landa landa.martin at gmail.com
Fri Dec 15 01:49:45 PST 2017


I am having problem with attributes which have defined precision, eg.

QgsField("ader_microsvh", QVariant.Double, prec=4),

The values are displayed correctly when loading layer to the memory
(see left part of screenshot), but after exporting such layer to SHP,
the values are lost (zero value with given precision), see right part
of screenshot. Tested with QGIS 2.14 and 2.18. Do you have any idea
how to fix this issue without dropping precision? Thanks, Martin

Martin Landa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qgis-precision-shp.png
Type: image/png
Size: 47637 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171215/76721ad3/attachment-0001.png>

More information about the QGIS-Developer mailing list