Skip to content
Permalink
Browse files

dummy commit to reflect changes to address #3148: writing output with…

… conflicting field names now handled gracefully by writer (or caught ahead of time by fTools)

git-svn-id: http://svn.osgeo.org/qgis/trunk@15385 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
cfarmer
cfarmer committed Mar 8, 2011
1 parent b488037 commit c08e1a424fe1502046abab4aa15ccaddd1f715f3
Showing with 7 additions and 6 deletions.
  1. +7 −6 python/plugins/fTools/tools/doGeoprocessing.py
@@ -321,6 +321,7 @@ def buffering( self, useField ):
fields = vproviderA.fields()
writer = QgsVectorFileWriter( self.myName, self.myEncoding,
fields, QGis.WKBPolygon, vproviderA.crs() )
# check if writer was created properly, if not, return with error
if writer.hasError():
return GEOS_EXCEPT, FEATURE_EXCEPT, True, writer.errorMessage()
outFeat = QgsFeature()
@@ -449,7 +450,7 @@ def buffering( self, useField ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
del writer
return GEOS_EXCEPT, FEATURE_EXCEPT, True
return GEOS_EXCEPT, FEATURE_EXCEPT, True, None

def convex_hull(self, useField ):
GEOS_EXCEPT = True
@@ -583,7 +584,7 @@ def convex_hull(self, useField ):
except:
GEOS_EXCEPT = False
del writer
return GEOS_EXCEPT, FEATURE_EXCEPT, True
return GEOS_EXCEPT, FEATURE_EXCEPT, True, None

def dissolve( self, useField ):
GEOS_EXCEPT = True
@@ -594,7 +595,7 @@ def dissolve( self, useField ):
writer = QgsVectorFileWriter( self.myName, self.myEncoding,
fields, vproviderA.geometryType(), vproviderA.crs() )
if writer.hasError():
return GEOS_EXCEPT, FEATURE_EXCEPT, True, False
return GEOS_EXCEPT, FEATURE_EXCEPT, True, writer.errorMessage()
inFeat = QgsFeature()
outFeat = QgsFeature()
vproviderA.rewind()
@@ -722,7 +723,7 @@ def dissolve( self, useField ):
outFeat.setAttributeMap( attrs )
writer.addFeature( outFeat )
del writer
return GEOS_EXCEPT, FEATURE_EXCEPT, True
return GEOS_EXCEPT, FEATURE_EXCEPT, True, None

def difference( self ):
GEOS_EXCEPT = True
@@ -881,7 +882,7 @@ def difference( self ):
FEATURE_EXCEPT = False
continue
del writer
return GEOS_EXCEPT, FEATURE_EXCEPT, crs_match
return GEOS_EXCEPT, FEATURE_EXCEPT, crs_match, None

def intersect( self ):
GEOS_EXCEPT = True
@@ -1531,7 +1532,7 @@ def clip( self ):
GEOS_EXCEPT = False
continue
del writer
return GEOS_EXCEPT, FEATURE_EXCEPT, crs_match
return GEOS_EXCEPT, FEATURE_EXCEPT, crs_match, None

def checkParameter( self, layer, param ):
if self.myFunction == 1:

0 comments on commit c08e1a4

Please sign in to comment.
You can’t perform that action at this time.