Skip to content
Permalink
Browse files

fixed some PEP8 issues

  • Loading branch information
havatv committed Nov 1, 2018
1 parent 8976f68 commit 681f73ae4e7e92761188b46fadf602038b15897c
Showing with 12 additions and 11 deletions.
  1. +12 −11 python/plugins/processing/algs/gdal/extractprojection.py
@@ -52,17 +52,18 @@ def __init__(self):

def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterLayer(
self.INPUT,
self.tr('Input file')))
self.INPUT,
self.tr('Input file')))
self.addParameter(QgsProcessingParameterBoolean(
self.PRJ_FILE_CREATE,
self.tr('Create also .prj file'), False))
self.addOutput(QgsProcessingOutputFile(self.WORLD_FILE,
self.tr('World file')))
self.PRJ_FILE_CREATE,
self.tr('Create also .prj file'), False))
self.addOutput(QgsProcessingOutputFile(
self.PRJ_FILE,
self.tr('ESRI Shapefile prj file')))

self.WORLD_FILE,
self.tr('World file')))
self.addOutput(QgsProcessingOutputFile(
self.PRJ_FILE,
self.tr('ESRI Shapefile prj file')))

def name(self):
return 'extractprojection'

@@ -93,7 +94,7 @@ def processAlgorithm(self, parameters, context, feedback):
raster = self.parameterAsRasterLayer(parameters, self.INPUT,
context)
if not raster.dataProvider().name() == 'gdal':
raise QgsProcessingException('This algorithm can only '\
raise QgsProcessingException('This algorithm can only '
'be used with GDAL raster layers')
rasterPath = raster.source()
rasterDS = gdal.Open(rasterPath, gdal.GA_ReadOnly)
@@ -116,7 +117,7 @@ def processAlgorithm(self, parameters, context, feedback):
with open(outFileName + '.prj', 'wt') as prj:
prj.write(crs)
results[self.PRJ_FILE] = outFileName + '.prj'
else:
else:
results[self.PRJ_FILE] = None

with open(outFileName + '.wld', 'wt') as wld:

0 comments on commit 681f73a

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