Skip to content
Permalink
Browse files

fTools: remove unnecessary checks on output field names (fix #8241)

  • Loading branch information
minorua committed Jul 10, 2013
1 parent 5592878 commit 8ae64b438ecad7f927496af2c4d833339781b854
Showing with 0 additions and 23 deletions.
  1. +0 −15 python/plugins/fTools/tools/doGeoprocessing.py
  2. +0 −8 python/plugins/fTools/tools/doSpatialJoin.py
@@ -891,11 +891,6 @@ def intersect( self ):
else:
crs_match = crsA == crsB
fields = ftools_utils.combineVectorFields( self.vlayerA, self.vlayerB )
longNames = ftools_utils.checkFieldNameLength( fields )
if longNames:
message = self.tr('Following field names are longer than 10 characters:\n%s') % ( '\n'.join(longNames) )
return GEOS_EXCEPT, FEATURE_EXCEPT, crs_match, message

writer = QgsVectorFileWriter( self.myName, self.myEncoding, fields,
vproviderA.geometryType(), vproviderA.crs() )
if writer.hasError():
@@ -1076,11 +1071,6 @@ def union( self ):
crs_match = crsA == crsB

fields = ftools_utils.combineVectorFields( self.vlayerA, self.vlayerB )
longNames = ftools_utils.checkFieldNameLength( fields )
if longNames:
message = self.tr( 'Following field names are longer than 10 characters:\n%s' ) % ( "\n".join(longNames) )
return GEOS_EXCEPT, FEATURE_EXCEPT, crs_match, message

writer = QgsVectorFileWriter( self.myName, self.myEncoding, fields,
vproviderA.geometryType(), vproviderA.crs() )
if writer.hasError():
@@ -1262,11 +1252,6 @@ def symetrical_difference( self ):
crs_match = crsA == crsB

fields = ftools_utils.combineVectorFields( self.vlayerA, self.vlayerB )
longNames = ftools_utils.checkFieldNameLength( fields )
if longNames:
message = self.tr( 'Following field names are longer than 10 characters:\n%s' ) % ( "\n".join(longNames) )
return GEOS_EXCEPT, FEATURE_EXCEPT, crs_match, message

writer = QgsVectorFileWriter( self.myName, self.myEncoding, fields,
vproviderA.geometryType(), vproviderA.crs() )
if writer.hasError():
@@ -146,14 +146,6 @@ def compute(self, inName, joinName, outName, summary, sumList, keep, progressBar
seq = range(0, len(fieldList1))
fieldList1 = dict(zip(seq, fieldList1))

# check for correct field names
print fieldList1
longNames = ftools_utils.checkFieldNameLength( fieldList1.values() )
if len( longNames ) > 0:
QMessageBox.warning( self, self.tr( 'Incorrect field names' ),
self.tr( 'No output will be created.\nFollowing field names are longer than 10 characters:\n%s' ) % ( "\n".join(longNames) ) )
return False

sRs = provider1.crs()
progressBar.setValue(13)
check = QFile(self.shapefileName)

0 comments on commit 8ae64b4

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