Skip to content
Permalink
Browse files

fixed bad imports in lidar package

fixed problem with non-ascii filenames
(both patches supplied by Alexander Bruy)

git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@250 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf@gmail.com
volayaf@gmail.com committed Jun 18, 2012
1 parent 3d9f712 commit d03a0fba6e248d5e758c49082f1acfd1cd0f43bb
@@ -30,7 +30,7 @@ def getVectorLayers(shapetype=-1):
for layer in layers:
if layer.type() == layer.VectorLayer:
if shapetype == QGisLayers.ALL_TYPES or layer.geometryType() == shapetype:
uri = str(layer.source())
uri = unicode(layer.source())
if not uri.endswith("csv") and not uri.endswith("dbf"):
vector.append(layer)
return vector
@@ -48,7 +48,7 @@ def getTables():
tables = list()
for layer in layers:
if layer.type() == layer.VectorLayer :
uri = str(layer.source())
uri = unicode(layer.source())
if uri.endswith("csv") or uri.endswith("dbf"):
tables.append(layer)
return tables
@@ -100,7 +100,7 @@ def load(layer, name = None, crs = None, style = None):
else:
if prjSetting:
settings.setValue("/Projections/defaultBehaviour", prjSetting)
raise RuntimeError("Could not load layer: " + str(layer)
raise RuntimeError("Could not load layer: " + unicode(layer)
+"\nCheck the SEXTANTE log to look for errors in algorithm execution")
if prjSetting:
settings.setValue("/Projections/defaultBehaviour", prjSetting)
@@ -2,10 +2,10 @@
from sextante.parameters.ParameterFile import ParameterFile
from sextante.outputs.OutputTable import OutputTable
from sextante.core.GeoAlgorithm import GeoAlgorithm
from sextante.fusion.FusionUtils import FusionUtils
from sextante.lidar.fusion.FusionUtils import FusionUtils
from PyQt4 import QtGui
from sextante.parameters.ParameterNumber import ParameterNumber
from sextante.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.lidar.fusion.FusionAlgorithm import FusionAlgorithm

class CanopyMaxima(FusionAlgorithm):

@@ -1,11 +1,11 @@
import os
from sextante.parameters.ParameterFile import ParameterFile
from sextante.fusion.FusionUtils import FusionUtils
from sextante.lidar.fusion.FusionUtils import FusionUtils
from sextante.parameters.ParameterNumber import ParameterNumber
from sextante.outputs.OutputRaster import OutputRaster
from sextante.parameters.ParameterSelection import ParameterSelection
import subprocess
from sextante.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.lidar.fusion.FusionAlgorithm import FusionAlgorithm

class CanopyModel(FusionAlgorithm):

@@ -55,4 +55,4 @@ def processAlgorithm(self, progress):
commands.append(outFile)
commands.append(self.getOutputValue(self.OUTPUT))
p = subprocess.Popen(commands, shell=True)
p.wait()
p.wait()
@@ -1,12 +1,12 @@
import os
from sextante.parameters.ParameterFile import ParameterFile
from sextante.fusion.FusionUtils import FusionUtils
from sextante.lidar.fusion.FusionUtils import FusionUtils
from PyQt4 import QtGui
import subprocess
from sextante.parameters.ParameterExtent import ParameterExtent
from sextante.outputs.OutputFile import OutputFile
from sextante.parameters.ParameterSelection import ParameterSelection
from sextante.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.lidar.fusion.FusionAlgorithm import FusionAlgorithm

class ClipData(FusionAlgorithm):

@@ -48,4 +48,4 @@ def processAlgorithm(self, progress):
commands.append(outFile)
commands.append(self.getOutputValue(self.OUTPUT))
p = subprocess.Popen(commands, shell=True)
p.wait()
p.wait()
@@ -1,8 +1,8 @@
import os
from sextante.parameters.ParameterFile import ParameterFile
from sextante.outputs.OutputTable import OutputTable
from sextante.fusion.FusionUtils import FusionUtils
from sextante.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.lidar.fusion.FusionUtils import FusionUtils
from sextante.lidar.fusion.FusionAlgorithm import FusionAlgorithm

class CloudMetrics(FusionAlgorithm):

@@ -1,13 +1,13 @@
import os
from sextante.parameters.ParameterFile import ParameterFile
from sextante.core.GeoAlgorithm import GeoAlgorithm
from sextante.fusion.FusionUtils import FusionUtils
from sextante.lidar.fusion.FusionUtils import FusionUtils
from PyQt4 import QtGui
from sextante.parameters.ParameterNumber import ParameterNumber
from sextante.outputs.OutputRaster import OutputRaster
from sextante.parameters.ParameterSelection import ParameterSelection
import subprocess
from sextante.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.lidar.fusion.FusionAlgorithm import FusionAlgorithm

class Cover(FusionAlgorithm):

@@ -59,4 +59,4 @@ def processAlgorithm(self, progress):
commands.append(outFile)
commands.append(self.getOutputValue(self.OUTPUT))
p = subprocess.Popen(commands, shell=True)
p.wait()
p.wait()
@@ -1,9 +1,9 @@
import os
from sextante.parameters.ParameterFile import ParameterFile
from sextante.fusion.FusionUtils import FusionUtils
from sextante.lidar.fusion.FusionUtils import FusionUtils
import subprocess
from sextante.outputs.OutputFile import OutputFile
from sextante.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.lidar.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.parameters.ParameterNumber import ParameterNumber

class FilterData(FusionAlgorithm):
@@ -44,4 +44,4 @@ def processAlgorithm(self, progress):
commands.append(outFile)
commands.append(self.getOutputValue(self.OUTPUT))
p = subprocess.Popen(commands, shell=True)
p.wait()
p.wait()
@@ -1,8 +1,8 @@
import os
from sextante.parameters.ParameterFile import ParameterFile
from sextante.outputs.OutputTable import OutputTable
from sextante.fusion.FusionUtils import FusionUtils
from sextante.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.lidar.fusion.FusionUtils import FusionUtils
from sextante.lidar.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.parameters.ParameterNumber import ParameterNumber

class GridMetrics(FusionAlgorithm):
@@ -1,9 +1,9 @@
import os
from sextante.parameters.ParameterFile import ParameterFile
from sextante.fusion.FusionUtils import FusionUtils
from sextante.lidar.fusion.FusionUtils import FusionUtils
from sextante.parameters.ParameterNumber import ParameterNumber
from sextante.parameters.ParameterSelection import ParameterSelection
from sextante.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.lidar.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.outputs.OutputFile import OutputFile

class GridSurfaceCreate(FusionAlgorithm):
@@ -43,4 +43,4 @@ def processAlgorithm(self, progress):
else:
FusionUtils.createFileList(files)
commands.append(FusionUtils.tempFileListFilepath())
FusionUtils.runFusion(commands, progress)
FusionUtils.runFusion(commands, progress)
@@ -1,9 +1,9 @@
import os
from sextante.parameters.ParameterFile import ParameterFile
from sextante.fusion.FusionUtils import FusionUtils
from sextante.lidar.fusion.FusionUtils import FusionUtils
import subprocess
from sextante.outputs.OutputFile import OutputFile
from sextante.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.lidar.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.parameters.ParameterNumber import ParameterNumber

class GroundFilter(FusionAlgorithm):
@@ -39,4 +39,4 @@ def processAlgorithm(self, progress):
commands.append(outFile)
commands.append(self.getOutputValue(self.OUTPUT))
p = subprocess.Popen(commands, shell=True)
p.wait()
p.wait()
@@ -1,8 +1,8 @@
import os
from sextante.parameters.ParameterFile import ParameterFile
from sextante.fusion.FusionUtils import FusionUtils
from sextante.lidar.fusion.FusionUtils import FusionUtils
from sextante.outputs.OutputFile import OutputFile
from sextante.fusion.FusionAlgorithm import FusionAlgorithm
from sextante.lidar.fusion.FusionAlgorithm import FusionAlgorithm

class MergeData(FusionAlgorithm):

@@ -1,10 +1,10 @@
import os
from PyQt4 import QtGui
from sextante.parameters.ParameterString import ParameterString
from sextante.lastools.LasToolsUtils import LasToolsUtils
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
from sextante.parameters.ParameterBoolean import ParameterBoolean
from sextante.outputs.OutputRaster import OutputRaster
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.parameters.ParameterFile import ParameterFile

class las2dem(LasToolsAlgorithm):
@@ -1,6 +1,6 @@
import os
from sextante.lastools.LasToolsUtils import LasToolsUtils
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.parameters.ParameterNumber import ParameterNumber
from sextante.outputs.OutputVector import OutputVector
from sextante.parameters.ParameterFile import ParameterFile
@@ -1,7 +1,7 @@
import os
from sextante.outputs.OutputVector import OutputVector
from sextante.lastools.LasToolsUtils import LasToolsUtils
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.parameters.ParameterFile import ParameterFile

class las2shp(LasToolsAlgorithm):
@@ -3,10 +3,10 @@
from sextante.core.GeoAlgorithm import GeoAlgorithm
from sextante.parameters.ParameterString import ParameterString
from sextante.outputs.OutputVector import OutputVector
from sextante.lastools.LasToolsUtils import LasToolsUtils
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
from sextante.parameters.ParameterBoolean import ParameterBoolean
from sextante.parameters.ParameterNumber import ParameterNumber
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.parameters.ParameterFile import ParameterFile

class lasboundary(LasToolsAlgorithm):
@@ -1,6 +1,6 @@
import os
from sextante.lastools.LasToolsUtils import LasToolsUtils
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.parameters.ParameterFile import ParameterFile
from sextante.outputs.OutputFile import OutputFile

@@ -1,6 +1,6 @@
import os
from sextante.lastools.LasToolsUtils import LasToolsUtils
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.parameters.ParameterFile import ParameterFile
from sextante.outputs.OutputFile import OutputFile
from sextante.parameters.ParameterVector import ParameterVector
@@ -1,10 +1,10 @@
import os
from PyQt4 import QtGui
from sextante.parameters.ParameterString import ParameterString
from sextante.lastools.LasToolsUtils import LasToolsUtils
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
from sextante.parameters.ParameterBoolean import ParameterBoolean
from sextante.outputs.OutputRaster import OutputRaster
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.parameters.ParameterSelection import ParameterSelection
from sextante.parameters.ParameterFile import ParameterFile

@@ -1,7 +1,7 @@
import os
from PyQt4 import QtGui
from sextante.lastools.LasToolsUtils import LasToolsUtils
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.parameters.ParameterSelection import ParameterSelection
from sextante.parameters.ParameterFile import ParameterFile
from sextante.outputs.OutputFile import OutputFile
@@ -1,6 +1,6 @@
import os
from sextante.lastools.LasToolsUtils import LasToolsUtils
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.parameters.ParameterFile import ParameterFile
from sextante.outputs.OutputFile import OutputFile

@@ -1,6 +1,6 @@
import os
from sextante.lastools.LasToolsUtils import LasToolsUtils
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.parameters.ParameterFile import ParameterFile
from sextante.outputs.OutputHTML import OutputHTML

@@ -1,7 +1,7 @@
import os
from PyQt4 import QtGui
from sextante.lastools.LasToolsUtils import LasToolsUtils
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.parameters.ParameterFile import ParameterFile
from sextante.outputs.OutputHTML import OutputHTML

@@ -1,6 +1,6 @@
import os
from sextante.lastools.LasToolsUtils import LasToolsUtils
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
from sextante.parameters.ParameterFile import ParameterFile
from sextante.outputs.OutputFile import OutputFile
from sextante.parameters.ParameterNumber import ParameterNumber

0 comments on commit d03a0fb

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