Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] Remove unused dataobjects.extent method
  • Loading branch information
nyalldawson committed May 2, 2017
1 parent fa8f667 commit 0fbf1c2
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions python/plugins/processing/tools/dataobjects.py
Expand Up @@ -99,31 +99,6 @@ def getSupportedOutputRasterLayerExtensions():
return allexts


def extent(layers):
first = True
context = createContext()
for layer in layers:
if not isinstance(layer, (QgsMapLayer.QgsRasterLayer, QgsMapLayer.QgsVectorLayer)):
layer = QgsProcessingUtils.mapLayerFromString(layer, context)
if layer is None:
continue
if first:
xmin = layer.extent().xMinimum()
xmax = layer.extent().xMaximum()
ymin = layer.extent().yMinimum()
ymax = layer.extent().yMaximum()
else:
xmin = min(xmin, layer.extent().xMinimum())
xmax = max(xmax, layer.extent().xMaximum())
ymin = min(ymin, layer.extent().yMinimum())
ymax = max(ymax, layer.extent().yMaximum())
first = False
if first:
return '0,0,0,0'
else:
return str(xmin) + ',' + str(xmax) + ',' + str(ymin) + ',' + str(ymax)


def loadList(layers):
for layer in layers:
load(layer)
Expand Down

0 comments on commit 0fbf1c2

Please sign in to comment.