mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
[processing] remove duplicated code
This commit is contained in:
parent
d870b73a05
commit
d20a2ced9d
@ -30,6 +30,7 @@ from PyQt.QtGui import QIcon
|
|||||||
from PyQt.QtCore import QCoreApplication
|
from PyQt.QtCore import QCoreApplication
|
||||||
from qgis.core import QgsVectorFileWriter
|
from qgis.core import QgsVectorFileWriter
|
||||||
from processing.core.ProcessingConfig import Setting, ProcessingConfig
|
from processing.core.ProcessingConfig import Setting, ProcessingConfig
|
||||||
|
from processing.tools import dataobjects
|
||||||
|
|
||||||
|
|
||||||
class AlgorithmProvider(object):
|
class AlgorithmProvider(object):
|
||||||
@ -105,15 +106,7 @@ class AlgorithmProvider(object):
|
|||||||
return ['tif']
|
return ['tif']
|
||||||
|
|
||||||
def getSupportedOutputVectorLayerExtensions(self):
|
def getSupportedOutputVectorLayerExtensions(self):
|
||||||
formats = QgsVectorFileWriter.supportedFiltersAndFormats()
|
return dataobjects.getSupportedOutputVectorLayerExtensions()
|
||||||
extensions = ['shp'] # shp is the default, should be the first
|
|
||||||
for extension in formats.keys():
|
|
||||||
extension = unicode(extension)
|
|
||||||
extension = extension[extension.find('*.') + 2:]
|
|
||||||
extension = extension[:extension.find(' ')]
|
|
||||||
if extension.lower() != 'shp':
|
|
||||||
extensions.append(extension)
|
|
||||||
return extensions
|
|
||||||
|
|
||||||
def getSupportedOutputTableExtensions(self):
|
def getSupportedOutputTableExtensions(self):
|
||||||
return ['csv']
|
return ['csv']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user