Skip to content

Commit

Permalink
fTools: remove unnecessary checks on output field names (fix #8241)
Browse files Browse the repository at this point in the history
  • Loading branch information
minorua committed Jul 10, 2013
1 parent 5592878 commit 8ae64b4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
15 changes: 0 additions & 15 deletions python/plugins/fTools/tools/doGeoprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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():
Expand Down Expand Up @@ -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():
Expand Down
8 changes: 0 additions & 8 deletions python/plugins/fTools/tools/doSpatialJoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8ae64b4

Please sign in to comment.