Skip to content
Permalink
Browse files
extend default field width in fTools Export/Add Geometry column to fix
…#3500

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15739 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
alexbruy committed Apr 17, 2011
1 parent 8762db3 commit cbbb79f830837e9eb503fc49eff3a8d527c17372
Showing with 5 additions and 5 deletions.
  1. +5 −5 python/plugins/fTools/tools/doGeometry.py
@@ -829,33 +829,33 @@ def checkGeometryFields( self, vlayer ):
plp = "Poly"
( found, index1 ) = self.checkForField( nameList, "AREA" )
if not found:
field = QgsField( "AREA", QVariant.Double, "double", 10, 6, self.tr("Polygon area") )
field = QgsField( "AREA", QVariant.Double, "double", 21, 6, self.tr("Polygon area") )
index1 = len( fieldList.keys() )
fieldList[ index1 ] = field
( found, index2 ) = self.checkForField( nameList, "PERIMETER" )

if not found:
field = QgsField( "PERIMETER", QVariant.Double, "double", 10, 6, self.tr("Polygon perimeter") )
field = QgsField( "PERIMETER", QVariant.Double, "double", 21, 6, self.tr("Polygon perimeter") )
index2 = len( fieldList.keys() )
fieldList[ index2 ] = field
elif geomType == QGis.Line:
plp = "Line"
(found, index1) = self.checkForField(nameList, "LENGTH")
if not found:
field = QgsField("LENGTH", QVariant.Double, "double", 10, 6, self.tr("Line length") )
field = QgsField("LENGTH", QVariant.Double, "double", 21, 6, self.tr("Line length") )
index1 = len(fieldList.keys())
fieldList[index1] = field
index2 = index1
else:
plp = "Point"
(found, index1) = self.checkForField(nameList, "XCOORD")
if not found:
field = QgsField("XCOORD", QVariant.Double, "double", 10, 6, self.tr("Point x coordinate") )
field = QgsField("XCOORD", QVariant.Double, "double", 21, 6, self.tr("Point x coordinate") )
index1 = len(fieldList.keys())
fieldList[index1] = field
(found, index2) = self.checkForField(nameList, "YCOORD")
if not found:
field = QgsField("YCOORD", QVariant.Double, "double", 10, 6, self.tr("Point y coordinate") )
field = QgsField("YCOORD", QVariant.Double, "double", 21, 6, self.tr("Point y coordinate") )
index2 = len(fieldList.keys())
fieldList[index2] = field
return (fieldList, index1, index2)

0 comments on commit cbbb79f

Please sign in to comment.