-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added some i.* to grass, some new tools to lastools and nviz
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@148 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
- Loading branch information
volayaf
committed
Apr 24, 2012
1 parent
0023d04
commit dbbcca2
Showing
25 changed files
with
229 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
i.attcorr | ||
i.attcorr | ||
Imagery (i.*) | ||
ParameterBoolean|-f|-f|False | ||
ParameterBoolean|-a|-a|False | ||
ParameterBoolean|-b|-b|False | ||
ParameterBoolean|-o|-o|False | ||
ParameterRaster|iimg|iimg|False | ||
ParameterRaster|ialt|ialt|True | ||
ParameterRaster|ivis|ivis|True | ||
ParameterRange|iscl|iscl|0,255 | ||
ParameterFile|icnd|icnd|False | ||
OutputRaster|oimg|oimg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
i.fft | ||
i.fft | ||
Imagery (i.*) | ||
ParameterRaster|input_image|input_image|False | ||
OutputRaster|real_image|real_image | ||
OutputRaster|imaginary_image|imaginary_image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
i.his.rgb | ||
i.his.rgb | ||
Imagery (i.*) | ||
ParameterRaster|hue_input|hue_input|False | ||
ParameterRaster|intensity_input|intensity_input|False | ||
ParameterRaster|saturation_input|saturation_input|False | ||
OutputRaster|red_output|red_output | ||
OutputRaster|green_output|green_output | ||
OutputRaster|blue_output|blue_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
i.ifft | ||
i.ifft | ||
Imagery (i.*) | ||
ParameterRaster|real_image|real_image|False | ||
ParameterRaster|imaginary_image|imaginary_image|False | ||
OutputRaster|output_image|output_image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
i.zc | ||
i.zc | ||
Imagery (i.*) | ||
ParameterRaster|input|input|False | ||
ParameterRaster|green|green|False | ||
ParameterNumber|width|width|1|None|9 | ||
ParameterNumber|threshold|threshold|0|None|10.0 | ||
ParameterNumber|orientations|orientations|0|None|1 | ||
OutputRaster|output|output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
nviz | ||
nviz | ||
Visualization(NVIZ) | ||
ParameterMultipleInput|elevation|elevation|3|False | ||
ParameterMultipleInput|vector|vector|-1|False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import os | ||
from sextante.parameters.ParameterMultipleInput import ParameterMultipleInput | ||
from sextante.grass.GrassUtils import GrassUtils | ||
from sextante.core.GeoAlgorithm import GeoAlgorithm | ||
from PyQt4 import QtGui | ||
|
||
class nviz(GeoAlgorithm): | ||
|
||
ELEVATION = "ELEVATION" | ||
VECTOR = "VECTOR" | ||
|
||
def getIcon(self): | ||
return QtGui.QIcon(os.path.dirname(__file__) + "/../images/grass.png") | ||
|
||
def defineCharacteristics(self): | ||
self.name = "nviz" | ||
self.group = "Visualization(NVIZ)" | ||
self.addParameter(ParameterMultipleInput(nviz.ELEVATION, "Elevation layers", ParameterMultipleInput.TYPE_RASTER, True)) | ||
self.addParameter(ParameterMultipleInput(nviz.VECTOR, "Vector layers", ParameterMultipleInput.TYPE_VECTOR_ANY, True)) | ||
|
||
def processAlgorithm(self, progress): | ||
commands = [] | ||
command = "nviz" | ||
vector = self.getParameterValue(self.VECTOR); | ||
elevation = self.getParameterValue(self.ELEVATION); | ||
if vector: | ||
command += (" vector=" + vector.replace(";", ",")) | ||
if elevation: | ||
command += (" elevation=" + elevation.replace(";", ",")) | ||
if elevation is None and vector is None: | ||
command += " -q" | ||
commands.append(command) | ||
GrassUtils.createTempMapset(); | ||
GrassUtils.executeGrass(commands, progress) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import os | ||
from sextante.lastools.LasToolsUtils import LasToolsUtils | ||
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm | ||
from sextante.parameters.ParameterFile import ParameterFile | ||
from sextante.outputs.OutputFile import OutputFile | ||
|
||
class lasheight(LasToolsAlgorithm): | ||
|
||
INPUT = "INPUT" | ||
OUTPUT = "OUTPUT" | ||
|
||
def defineCharacteristics(self): | ||
self.name = "lasheight" | ||
self.group = "Tools" | ||
self.addParameter(ParameterFile(lasheight.INPUT, "Input las layer", "")) | ||
self.addOutput(OutputFile(lasheight.OUTPUT, "Output height las file")) | ||
self.addCommonParameters() | ||
|
||
def processAlgorithm(self, progress): | ||
commands = [os.path.join(LasToolsUtils.LasToolsPath(), "bin", "lasheight.exe")] | ||
commands.append("-i") | ||
commands.append(self.getParameterValue(lasheight.INPUT)) | ||
commands.append("-o") | ||
commands.append(self.getOutputValue(lasheight.OUTPUT)) | ||
self.addCommonParameterValuesToCommand(commands) | ||
|
||
LasToolsUtils.runLasTools(commands, progress) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import os | ||
from PyQt4 import QtGui | ||
from sextante.lastools.LasToolsUtils import LasToolsUtils | ||
from sextante.lastools.LasToolsAlgorithm import LasToolsAlgorithm | ||
from sextante.parameters.ParameterFile import ParameterFile | ||
from sextante.outputs.OutputHTML import OutputHTML | ||
|
||
class lasprecision(LasToolsAlgorithm): | ||
|
||
INPUT = "INPUT" | ||
OUTPUT = "OUTPUT" | ||
|
||
def defineCharacteristics(self): | ||
self.name = "lasprecision" | ||
self.group = "Tools" | ||
self.addParameter(ParameterFile(lasprecision.INPUT, "Input las layer", "")) | ||
self.addOutput(OutputHTML(lasprecision.OUTPUT, "Output info file")) | ||
|
||
def processAlgorithm(self, progress): | ||
commands = [os.path.join(LasToolsUtils.LasToolsPath(), "bin", "lasprecision.exe")] | ||
commands.append("-i") | ||
commands.append(self.getParameterValue(lasprecision.INPUT)) | ||
commands.append(">") | ||
commands.append(self.getOutputValue(lasprecision.OUTPUT) + ".txt") | ||
|
||
LasToolsUtils.runLasTools(commands, progress) | ||
fin = open (self.getOutputValue(lasprecision.OUTPUT) + ".txt") | ||
fout = open (self.getOutputValue(lasprecision.OUTPUT), "w") | ||
lines = fin.readlines() | ||
for line in lines: | ||
fout.write(line + "<br>") | ||
fin.close() | ||
fout.close() | ||
|
Oops, something went wrong.