|
30 | 30 |
|
31 | 31 | from processing.core.AlgorithmProvider import AlgorithmProvider
|
32 | 32 | from processing.core.ProcessingLog import ProcessingLog
|
33 |
| -from processing.script.WrongScriptException import WrongScriptException |
34 |
| -from processing.algs.gdal.GdalAlgorithm import GdalScriptAlgorithm |
35 | 33 | from GdalUtils import GdalUtils
|
36 | 34 |
|
37 | 35 | from nearblack import nearblack
|
@@ -95,27 +93,14 @@ class GdalOgrAlgorithmProvider(AlgorithmProvider):
|
95 | 93 | """This provider incorporates GDAL-based algorithms into the
|
96 | 94 | Processing framework.
|
97 | 95 |
|
98 |
| - Algorithms have been implemented using two different mechanisms, |
99 |
| - which should serve as an example of different ways of extending |
100 |
| - the processing capabilities of QGIS: |
101 |
| - 1. when a python script exist for a given process, it has been |
102 |
| - adapted as a Processing python script and loaded using the |
103 |
| - ScriptAlgorithm class. This algorithms call GDAL using its |
104 |
| - Python bindings. |
105 |
| - 2. Other algorithms are called directly using the command line |
106 |
| - interface. These have been implemented individually extending |
107 |
| - the GeoAlgorithm class. |
| 96 | + Algorithms are called directly using the command line interface. |
| 97 | + They implemented individually extending GeoAlgorithm class. |
108 | 98 | """
|
109 | 99 |
|
110 | 100 | def __init__(self):
|
111 | 101 | AlgorithmProvider.__init__(self)
|
112 | 102 | self.createAlgsList()
|
113 | 103 |
|
114 |
| - def scriptsFolder(self): |
115 |
| - """The folder where script algorithms are stored. |
116 |
| - """ |
117 |
| - return os.path.dirname(__file__) + '/scripts' |
118 |
| - |
119 | 104 | def getDescription(self):
|
120 | 105 | return self.tr('GDAL/OGR')
|
121 | 106 |
|
@@ -147,18 +132,5 @@ def createAlgsList(self):
|
147 | 132 | Ogr2OgrTableToPostGisList(), OgrSql(),
|
148 | 133 | ]
|
149 | 134 |
|
150 |
| - # And then we add those that are created as python scripts |
151 |
| - folder = self.scriptsFolder() |
152 |
| - if os.path.exists(folder): |
153 |
| - for descriptionFile in os.listdir(folder): |
154 |
| - if descriptionFile.endswith('py'): |
155 |
| - try: |
156 |
| - fullpath = os.path.join(self.scriptsFolder(), |
157 |
| - descriptionFile) |
158 |
| - alg = GdalScriptAlgorithm(fullpath) |
159 |
| - self.preloadedAlgs.append(alg) |
160 |
| - except WrongScriptException as e: |
161 |
| - ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, e.msg) |
162 |
| - |
163 | 135 | def getSupportedOutputRasterLayerExtensions(self):
|
164 | 136 | return GdalUtils.getSupportedRasterExtensions()
|
0 commit comments